upstream retries with a single server

Maxim Dounin mdounin at
Sun Nov 21 02:12:57 MSK 2010


On Sat, Nov 20, 2010 at 09:48:15PM +0530, Arvind Jayaprakash wrote:

> Hello,
>   From the way I understand if there are 'n' servers listed as part of
> an upstream block & upstream returns failure (as defined by
> proxy_next_upstream), then nginx retries the same request on another
> upstream server and this repeats till every upstream is tried once
> (excluding those that are considered to be down).


> If an upstream block is defined with exactly one active server, I see
> that the request gets retried on the same upstream in case of a failure
> upto 'max_retries' number of times. Logically, I'd expect it to try just
> once and then give up if upstream fails to provide a suitable response.

There is no such thing as 'max_retries'.  As in previous case, all 
(i.e. the only one in this case) upstreams are tried once and then 
appropriate error returned.

Maxim Dounin

More information about the nginx mailing list