Forum Discussion
Sudhir_Sanil_88
May 19, 2006Historic F5 Account
irule to select pool based on fqdn
Hi,
I need an irule which can select the pool ( pool A or pool B) based on following criteria.
Example : web1.xyz.com and web2.xyz.com both resolve to same IP Address say 10.10.10.1, a ...
May 19, 2006
You can use a if statement:
when HTTP_REQUEST {
if { [HTTP::host] eq "web1.xyz.com" } {
pool poolA
} elseif { [HTTP::host] eq "web2.xyz.com" } {
pool poolB
}
}or with a switch statement:
when HTTP_REQUEST {
switch [HTTP::host] {
"web1.xyz.com" {
pool poolA
}
"web2.xyz.com" {
pool poolB
}
}
}I've been told that switch statements are let CPU intensive but it's really probably a toss in this situation. Use which ever method is easier for you to follow
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
