Forum Discussion
K-Dubb
Nimbostratus
Sep 30, 2013HTTP:Retry and LB:Reselect not working as expected.
Hello, We are using ASP.net Session state via SQL server behind our BIGIP Version 10.2.4. Session state is working great. We do not want the user to ever see a service unavailable. We tried setti...
StephanManthey
Nacreous
Oct 04, 2013The attached one seems to work as expected in v10.2.4.
Perhaps there is still a little overhead. I will investigate further but concentrate on v11.2.1.when CLIENT_ACCEPTED {
set retry 0
set reselect 0
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if { ([HTTP::method] eq "GET") && ($retry == 0) } {
set request_headers [HTTP::request]
log local0. "Current retries of $retry for [HTTP::uri]"
} elseif { ([HTTP::method] eq "GET") && ($retry > 0) && ($reselect > 0)} {
persist none
} elseif { ([HTTP::method] eq "GET") && ($retry > 0) && ($reselect == 0)} {
persist cookie insert "BIGipServer$default_pool"
}
}
when LB_SELECTED {
if { ($retry > 0) && ($reselect ==1) } {
log local0. "Re-loadbalancing to [LB::server] retries $retry [HTTP::uri]"
LB::reselect pool $default_pool
persist cookie insert "BIGipServer$default_pool"
}
}
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "5" } {
LB::down
set reselect 1
incr retry
log local0. "5xx error caught: retry $retry out of [active_members $default_pool]"
if { $retry < [active_members $default_pool] } {
log local0. "will retry now"
HTTP::retry $request_headers
return
}
} else {
persist cookie insert "BIGipServer$default_pool"
set retry 0
set reselect 0
}
}
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
