nginx doesn't switch upstream in some cases

Guillaume Filion gfk at
Fri Feb 12 16:53:46 MSK 2010

Benjamin Pineau a écrit :
> Piotr Sikora a écrit :
>>> What this directive in place, when one reverse proxy is down, half the
>>> requests take 0.2sec to return and half take 2.2sec to return. This is
>>> good enough for me. :)
>> You should consider using "max_fails" and "fail_timeout":
> Well, that's strange. According to the documentation, the default values
> for those are "max_fails=1 fail_timeout=10s".
> With those default settings (and with "timeout" in proxy_next_upstream),
> Guillaume shouldn't hit the timeout on half the requests, but rather
> only once in a while, right ?
> How can this happen ?

Actually, my "half the time" was based on running "time wget -O
/dev/null" a few times and looking at the
results. There's nothing statistical in my approach. :)

Guillaume Filion

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the nginx mailing list