Forum Discussion
Oct 01, 2013
I´ve got it working in v10.2.4HF7 for source address affinity in combination with oneconnect (plain oneconnect profile used, btw I recommend a 32bit mask) only. I´m deleting the persistence record and things work fine so far. There is still an issue with the limitation counter. It stops at twice the number of poolmembers if each server returns a '503':
when CLIENT_ACCEPTED {
set retry 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]"
}
}
when LB_SELECTED {
if { $retry > 0 } {
persist delete source_addr [IP::client_addr]
log local0. "Re-loadbalancing to [LB::server] retries $retry [HTTP::uri]"
LB::reselect pool $default_pool
}
}
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "5" } {
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 {
set retry 0
}
}
Another attempt with cookie persistence failed so far. But I´m running out of time right now and need to stop at this point, sorry.