Forum Discussion
ingard
Nimbostratus
May 02, 2017Reselect a specific backend based on initial response
Hi I'm trying to select a different backend and retry the same request based on the response from the initially selected backend. Basically the backend will either serve the request itself or respond...
JG
Cumulonimbus
May 04, 2017OK see two modified events:
when CLIENT_ACCEPTED {
set retries 0
set re-selected 0
set debug 5
}
when LB_SELECTED {
if { $re-selected == 1 } {
set re-selected 0
return;
}
if { $retries == 0 } {
Log LB pool/server selection
if { $debug > 0 } { log local0. "Retries : $retries - Server Selected : [LB::server pool] [LB::server addr]:[LB::server port]" }
} else {
Reselect LB node if retries > 0
if { $debug > 0 } { log local0. "Retries : $retries. wanted host/port = $wantedhost / $wantedport" }
set re-selected 1
LB::reselect pool pool_media_transcoding $wantedhost $wantedport
Log LB pool/server selection
if { $debug > 0 } { log local0. "Retries : $retries - Server Selected : [LB::server pool] [LB::server addr]:[LB::server port]" }
}
if { $debug > 4 } { log local0. "LB_SELECTED - Retries : $retries - Request: $request" }
}
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