Forum Discussion
Anthony_Pineda
Nimbostratus
Mar 24, 2015IRule for redirection after several hours of downtime
One of my clients has a request to redirect to a page after server pool has been down for two hours. Anyone have any ideas how I can get this going?
Thanks!
Brad_Parker
Cirrus
Mar 24, 2015you could try setting a timer using table in the LB_FAILED. You will have to remove the table entry if it exists in a LB_SELECTED event.
when LB_FAILED {
if { [active_members http_pool] = 0 } {
if { table lookup -notouch "[virtual name]_fallback" > 0 } {
if { expr [clock seconds] - [table lookup -notouch "[virtual name]_fallback"] >= 7200} {
HTTP::fallback
}
}
else {
table add "[virtual name]_fallback" [clock seconds] lifetime -1
}
}
}
- jgranieri_42214Mar 24, 2015
Nimbostratus
Brad could you use an irule with the "after" command? I know this queues up connections and may not be optimal bt it wold achieve the same result. with the above code snippet would that imply you need to have a LB_selected event as well since your using tables?
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