Upstream max_fails disable

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 the 10.100.0.11 is down, I would like it to just keep using it and
just return 502 if it’s down

upstream test
{
server 10.100.0.11;
keepalive 100;
}

Thanks

On Thu, Aug 08, 2013 at 10:45:14AM +0100, Richard K. 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:

http://nginx.org/en/docs/http/ngx_http_upstream_module.html#server

If the 10.100.0.11 is down, I would like it to just keep using it and
just return 502 if it’s down

upstream test
{
server 10.100.0.11;
keepalive 100;
}

Your expectations match the current nginx behavior.

Hello,

On Tue, Aug 13, 2013 at 8:31 AM, Ruslan E. [email protected] wrote:

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

​That would be worth mentioning in the Nginx documentation​…

Module ngx_http_upstream_module


B. R.

On Tue, Aug 13, 2013 at 12:36:25PM -0400, B.R. wrote:

Hello,

On Tue, Aug 13, 2013 at 8:31 AM, Ruslan E. [email protected] wrote:

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

​That would be worth mentioning in the Nginx documentation​…

We’ve added a note regarding this into description of the “server”
directive:
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#server