Forum Discussion
Sara123
Jul 10, 2023Nimbostratus
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 ...
- Jul 11, 2023
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.
Nikoolayy1
Jul 11, 2023MVP
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.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects