Forum Discussion
JJ_47859
Nimbostratus
Apr 21, 2008LB:server breaks my website
Hello,
We encountered a serious issue with out web application. I recently created an irule to redirect the users browser to an offline page if there were no servers available in the pool. ...
aayamauchi_746
Nimbostratus
May 06, 2008Not sure if you've come up with a solution to this already, but I've been using the following persistence iRule to get the load balancer to disable persistence and reselect from a pool of servers with outage content when the LB fails to get a member from the default pool. In my case, breaking the persistence and not having the redirect be visible to the end-user were requirements. May not be the cleanest way to do this, but it seems to work.
when CLIENT_ACCEPTED {
set pool_name [LB::server pool]
if {[active_members $pool_name] == 0}{
set ::persist 0
log local0.crit "No available members in pool \"$pool_name\": reselecting from pool \"sorry\"."
} else {
set ::persist 1
}
}
when HTTP_REQUEST {
if { [HTTP::cookie exists "JSESSIONID"] and $::persist>0} {
persist uie [HTTP::cookie "JSESSIONID"]
}
}
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] and $::persist>0} {
persist add uie [HTTP::cookie "JSESSIONID"]
}
}
when LB_FAILED {
if {$::persist==0}{
LB::detach
LB::reselect pool "sorry"
}
}
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