Forum Discussion
Kai_Wilke
Aug 07, 2016MVP
Hi Roy,
if the connection limit of a pool member has been exhausted, the pool member will become temporary marked down, so that it does not receive any new connections attemps. During this time
[active_members]
do not count nor list the pool member which connection limit is exhausted.
You may try the iRule below. It performs a transparent
LB::reselect
in the case a pool member has just become unresponsive (but still marked as online) and also displays a [HTTP::response 503]
in the case, that all remaining pool members are offline (or having their connection limits exhausted).
when LB_FAILED {
if { not [info exists "reselect_count"] } then {
set reselect_count 0
}
if { [active_members [LB::server pool]] > $reselect_count } then {
LB::mode rr
LB::reselect
incr reselect_count
} else {
HTTP::respond 503 content "The application is too busy to serve your requests..."
set reselect_count 0
}
}
Cheers, Kai