Not 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"
}
}