Forum Discussion
jkstraw_44238
Nimbostratus
Oct 09, 2007redirect to maint. page
Hello,
I have read a number of posts on how this can be done based on a pool being down but I think my situation/requirement may be unique.
We are running a JBoss/Tomcat webapp where there are...
Wil_Schultz_101
Nimbostratus
Oct 09, 2007We use Tomcat as well, I use the following irule for when we do deploy's.
when CLIENT_ACCEPTED {
set myretry 0
}
when HTTP_REQUEST {
set myrequest [HTTP::request]
}
when HTTP_RESPONSE {
if { [HTTP::status] == 503 }{
if {($myretry < 3) } {
log "got a 500... retrying, myretry == $myretry The request was $myrequest"
incr myretry
HTTP::retry $myrequest
}
else {
log "Going to maint because all servers are serving 503's, myretry == $myretry"
HTTP::redirect http://maint.my.com/
}
}
}
when LB_FAILED {
set mypool [LB::server]
log "$mypool seems to be having a problem..., going to the maint page myretry == $myretry"
log "$myrequest"
if { [active_members $mypool] < 1 } {
log "Going to maint because all servers are down"
HTTP::redirect http://maint.my.com/
}
}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
