Forum Discussion
How to tackle the downtime for maintenance of nginx
By default the health check time is 5 seconds and 16 s is the time out time for a server added under f5 pool. When we take down one server for maintenance, for 16 s we are seeing alternative request failure ng saying website not available, that is the time taken to mark the server as unavailable. How can we tackle this time taken to mark the now as down?
See https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/
http { #... match server_ok { status 200-399; body !~ "maintenance mode"; } server { #... location / { proxy_pass http://backend; health_check match=server_ok; } } }
Here the health check is passed if the status code of the response is in the range
200–
399, and its body does not contain the string
maintenance mode.
Sara123 I am not intimately familiar with nginx but I would imagine they have a similar health monitor option as just a normal F5 device for health monitors which will most likely solve your problem. On an F5 device you have a field in your HTTP health monitor that is a "receive down" string which allows the F5 to mark a pool member as down when a certain string is found in the HTTP response. Clients typically will use a string such as "down" in the HTTP response but this can be adjusted to whatever string you would like. With this health monitor feature being used the pool member should be marked down within 5 seconds because as soon as the F5 sees it the pool member is marked down. I would imagine that nginx will have the same option if you would like to look around that documentation.
See https://docs.nginx.com/nginx/admin-guide/load-balancer/http-health-check/
http { #... match server_ok { status 200-399; body !~ "maintenance mode"; } server { #... location / { proxy_pass http://backend; health_check match=server_ok; } } }
Here the health check is passed if the status code of the response is in the range
200–
399, and its body does not contain the string
maintenance mode.
- Leslie_HubertusRet. Employee
Sara123 - I've marked Nikoolayy1 's reply as the Accepted Solution because he linked to the documentation Paulius also mentioned. Please let us know if you're still having issues!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com