upstream max_fails disable

Ruslan Ermilov ru at
Tue Aug 13 12:31:01 UTC 2013

On Thu, Aug 08, 2013 at 10:45:14AM +0100, Richard Kearsley wrote:
> Hi
> I'm using the upstream module - with sole purpose to enable keepalives 
> to my backend
> I don't want to use any of the other features, I only have 1 server in 
> the upstream {}
> Does that mean max_fails is still being used? (defaults to 1?) and 
> fail_timeout etc..? they both have default values
> What happens if they are "all" marked as down?

If there's a single server, max_fails and fail_timeout parameters
are ignored, and such a server will never become temporarily down.

Please bear in mind that defining a server using a domain name that
resolves to several IP addresses essentially defines several servers:

> If the is down, I would like it to just keep using it and 
> just return 502 if it's down
> upstream test
> {
>      server;
>      keepalive 100;
> }

Your expectations match the current nginx behavior.

More information about the nginx mailing list