Jereme_De_Leo_4
Oct 04, 2006Nimbostratus
Fallback iRule
Greetings;
I am wanting to use the fallback host feature of the Big-IP to redirect users to a static "sorry" page when all nodes are unavailable in a pool. According to SOL6510 (https://tech.f5.com/home/solutions/sol6510.html), the fallback host will also be used to redirect an existing connection when a single server dies mid-session. This is not a good option for our environment.
The F5 solution listed above (SOL6510) provides an iRule (listed below) to have the Big-IP do nothing if a node dies while there are still other nodes available, thus making connections only redirect to the fallback host when there are no nodes available.
Is there a way to tweak this iRule so that, instead of doing nothing, the Big-IP will redirect a user to a different static URL if a single node dies mid-session? This way, the user will get a pretty page saying "sorry, your connection died, please retry" instead of a hung browser (404). And when they refresh, they will be load balanced to an available node. But, should all nodes be unavailable, the fallback host will be used.
----Start iRule Provided in SOL6510----
when LB_FAILED {
The following action (no action) will be triggered if the
connection fails while the pool still has available members.
if { [active_members [LB::server pool]] != 0 } {
} else {
The following action will be triggered if the connection fails
while the pool has no available members.
HTTP::fallback ""
}
}
----End iRule Provided in SOL6510----
Thank you in advance for your help.
Yours,
jddevcen