Forum Discussion
marsmann_58298
Oct 15, 2007Nimbostratus
Check/Get page load response after HTTP header checks ok
Hi all,
I am brand spankin' new to the F5's. I come from a former Cisco CSS environment so this is a big change for me. I would appreciate some help on the following simple request. I wan...
Deb_Allen_18
Oct 15, 2007Historic F5 Account
Well, if you want start over & resend the request to a new server after the payload is received, you could keep track of the total time since the 200 OK was seen & react accordingly. It seems like you'd just be creating more latency, though, not improving the response time, if your servers begin to respond slowly.
You would have to collect to trigger the response data event, then you could compare the times & decide on an action.
You can use LB::down to set the pool member status to DOWN, but it will kill all current connections (not just the one tirggering the logic) and once a monitor receives a timely response, it will be marked up again.
There is really no guarantee you'll get a better server the next time, but you can improve your chances by using Fastest or some other metric-based LB mode.
Something like this will do all of the above:
when RULE_INIT {
set ::tMax 30
}
when HTTP_REQUEST {
set req HTTP::request
}
when HTTP_RESPONSE {
if {[HTTP::status] == 200}{
set t0 [clock seconds]
HTTP::collect [HTTP::header Content-Length]
}
}
when HTTP_RESPONSE_DATA {
if {[clock seconds] > [expr {$t0 + $::tMax}]}{
LB::detach
LB::down
LB::reselect
HTTP::retry $req
} else {
HTTP::release
}
}
HTH/deb
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