We’re using Nginx to load balance between two upstream app servers and we’d like to be able to take one or the other down when we deploy to it. We’re finding that when we shut one down, Nginx is not failing over to the other. It keeps sending requests and logging errors.
Our upstream directive has the form:
upstream app_servers {
server 10.100.100.100:8080;
server 10.100.100.200:8080;
}
Our understanding from reading the Nginx docs is that we don’t need to explictly specify the “max_fails” or “fail_timeout” because they have reasonable defaults. (ie. max_fails of 1).
Any idea what we might be missing here?
Thanks much.
As per the documentation…
As per the documentation, a failure is define by proxy_next_upstream or fastcgi_next_upstream.
Please check the log what type of errors were logged, if it is not the default (error or timeout), then you may want to define it exclusively in proxy_next_upstream or fastcgi_next_upstream.