roykidder
Aug 05, 2016Nimbostratus
Respond with 5xx message when pool members connection limits reached (iRule?)
I have a use case where I have a pool of web server appliances that, when over loaded, simply time out. I want to set a connection limit on a per-member basis and then be able to hand back a 5xx to the client in the event that all pool members are overloaded. I'm assuming it would require an iRule but I'm not able to figure out how to do it. Since the pool members aren't actually down (they're marked unavailable when they reach their connection limit), testing for
if {[active_members [LB::server pool]] == 0}
didn't appear to work as I'd hoped. Likewise, the solution here didn't work either, even when I prepended the variable names with "static::" as suggested.
I'm currently running 11.6.0 code. Anyone have any suggestions?