Forum Discussion
Angel_Martinez_
Nimbostratus
Nov 18, 2010LB::server pool
Hi
I've this iRule running in two different boxes:
rule iRule_Sorry_Redirect {
when LB_FAILED {
if { [active_members [LB::server pool]] < 1 } {
HTTP::fallb...
hoolio
Cirrostratus
Nov 19, 2010Yeah, I'm not sure whether LB::server pool would return the VS default pool in LB_FAILED. If it doesn't, you could save the name of the pool in CLIENT_ACCEPTED and then reference that variable in LB_FAILED. Similarly, I don't know if HTTP::host would be available then either.
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if {[HTTP::host] eq ""}{
set host [IP::local_addr]
} else {
set host [HTTP::host]
}
}
when LB_FAILED {
if { [active_members $default_pool] < 1 } {
HTTP::fallback "http://sorry-$host"
}
}
Aaron
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