Forum Discussion
Gary_T_31565
Nimbostratus
Apr 23, 2007HTTP::fallback not working
hi,
new to irules. I am trialing 3400s.
HTTP:fallback is not working? I see "fallback host" in log. Tried with IE6 and IE7 just in case. Pool as two members which have their app po...
Deb_Allen_18
Apr 24, 2007Historic F5 Account
Hi Gary --
The command "HTTP::fallback" doesn't actually send traffic anywhere, it just sets the fallback target for this connection. The fallback target is only used if there are no responsive, available servers in the target pool. If even 1 server in the target pool looks available (UP [green] or UNCHECKED [blue]) and responds, no fallback is invoked.
Your iRule, however, is intended to respond with a redirect after several 503 responses. Since the servers have to be UP to respond with a 503 response, calling HTTP::fallback will not have the intended effect.
A minor change to your code will accomplish the expected redirect after the defined of 503 responses:
when CLIENT_ACCEPTED {
set retries 0
}
when HTTP_REQUEST {
set request [HTTP::request]
}
when HTTP_RESPONSE {
if {[HTTP::status] eq "503"} {
if {$retries < [active_members Pool2]} {
log "503 retrying $retries"
incr retries
HTTP::retry $request
} else {
log "Max retries exceeded -- redirecting"
HTTP::redirect "http://livevm1/garys_warning.htm"
}
}
}
You can also apply health monitors to manage pool member availability, or toggle their status manually:
To make servers "unavailable" when not responding as expected, you will need to apply an HTTP monitor requesting a specific page and expecting a specific response. (Click here for manual page.)
To manually manage the pool members' status, browse in the GUI to the pool (Local Traffic/Pools), clicking "Members" and use the checkbox & Enable /Disable buttons to change status as required.
HTH
/deb
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