Forum Discussion
Jereme_De_Leo_4
Nimbostratus
Oct 04, 2006Fallback 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
- Jereme_De_Leo_4
Nimbostratus
Another thought about the above post... - Colin_Walker_12Historic F5 AccountThe iRule can be used either with or in place of a fallback host. This is why there is a fallback command in the iRule, as you can see in your above post.
- Jereme_De_Leo_4
Nimbostratus
Colin, - Deb_Allen_18Historic F5 Accountyep, it looks like it would do exactly that...
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