Forum Discussion
Rahul_Yadav
Cirrus
Aug 18, 2019iRule - Pool member Failover
Hi, PFB iRule. Purpose: 1 VS for 3 application and redirection on the basis of host name. for each application we have different Pool. If pqr.com or xyz.com not working redirect to abc.com ...
Aug 19, 2019
This iRule use to default policy for sub.pqr.com request. You should use "*" character for sub-domains.
Also, you can redirect to pool, instead of redirecting to abc.com.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"abc.com" { pool Pool_1 }
"pqr.com" -
"*.pqr.com" {
if { [HTTP::uri] contains "pqr" && [active_members Pool_2] >= 1 } {
pool Pool_2
} else {
pool Pool_1
}
}
"xyz.com" -
"*.xyz.com" {
if { [HTTP::uri] contains "xyz" && [active_members Pool_3] >= 1 } {
pool Pool_3
} else {
pool Pool_1
}
}
default { pool Pool_1 }
}
}Rahul_Yadav
Cirrus
Aug 23, 2019Thanks Let me test it 😀
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