TCP::Close when pool is down
We have a scenario where a remote client will make a TCP connection to the F5 and in turn a backend server.
We are using MBLB to load balance the traffic to backend servers.
This TCP connection could stay open for a while and it could be a while between messages. This works great so far.
What we need to finish it off though is in the event that all pool members are down there is a TCP::Close sent back to the clients.
I have got this working by using the LB_FAILED as below -
when LB_FAILED {
log local0. "LB FAILED"
if { [active_members MY_POOL] == 0 } { TCP::close log local0. "TCP CLOSED" } }
However this only works if a new message is received once the pool members are down. It doesn't trigger off a TCP::Close if the pool members go down.
I can't find a way to use the pool down event to then trigger off a TCP::Close.