Forum Discussion
11.4 node/pool select according to domains list
Thanks, can I make it easier so if there is a match from the list then go to pool1 otherwise go to pool2, then I will just put the first half in the list without specifying a pool.
Certainly. Create the data group with the first set of domains, then modify the iRule accordingly:
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::host]] equals my_domain_dg] } {
pool pool1
} else {
pool pool2
}
}
In this version, your data group entries don't have to have a corresponding pool or node value - just enter the domain name as the key and leave the value blank (we're not going to use it). Then create TWO pools: pool1 for domains that are in the data group, and pool2 for everything else.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com