Connection Draining based upon Health Monitoring?
I have an application that has a special URL which returns the server's health state, and I'm working with our load balancing team, who is configuring the F5 for me, and they are having trouble with the Maintenance aspect.
The server URL returns the following values:
- If the server is healthy and available for new requests, it returns 'PASS'.
- If the server is in Maintenance mode (still up, but should not be sent new requests), the URL returns 'MAINTENANCE'.
- If the server is down, it returns various error messages, like 'FAIL' or 500, etc.
What I would like is for the F5 to recognize the server URL's "MAINTENANCE" response as a special condition that allows persistent connections to drain normally, and just not send any new connections to that server.
We tried setting the 'Action On Service Down' to None, which somewhat allowed the existing connections to drain in Maintenance mode, but the same behavior continued when the server physically went down (then users got error messages).
Alternatively, other settings kill the node promptly when the server really is down, but also kill it for the 'MAINTENANCE' response too.
Is there any way we can customize the logic to achieve the desired behavior, perhaps with an iRule?
Apologies for not knowing much about F5 load balancing...
Appreciate any help.
Thanks, Paul
There is an option called "recv disable" string which if received will disable the member.
From the monitor configuration monitor monwebserver { defaults from https recv disable "MAINTENANCE" recv "PASS" send "GET / HTTP/1.1\r\nHost: abc.com\r\nConnection: close\r\n\r\n } This will disable the member if MAINTENANCE is received and will enable it if PASS is received. when its disabled it will allow existing connections.