Forum: NGINX upstream max_fails disable

24a9986d5a2fa4d006f22abed0b8951e?d=identicon&s=25 Richard Kearsley (Guest)
on 2013-08-08 11:45
(Received via mailing list)
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
2154be8b4430488454f0a067e09863b9?d=identicon&s=25 Ruslan Ermilov (Guest)
on 2013-08-13 14:31
(Received via mailing list)
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:

http://nginx.org/en/docs/http/ngx_http_upstream_mo...

> 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.
1266aa99d1601b47bbd3ec22affbb81c?d=identicon&s=25 B.R. (Guest)
on 2013-08-13 18:37
(Received via mailing list)
Hello,

On Tue, Aug 13, 2013 at 8:31 AM, Ruslan Ermilov <ru@nginx.com> 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​...


> http://nginx.org/en/docs/http/ngx_http_upstream_mo...
>
> ---
*B. R.*
7a8e9bb034db81e612d72b30af4932d0?d=identicon&s=25 Vladimir Homutov (Guest)
on 2013-08-15 14:10
(Received via mailing list)
On Tue, Aug 13, 2013 at 12:36:25PM -0400, B.R. wrote:
> Hello,
>
> On Tue, Aug 13, 2013 at 8:31 AM, Ruslan Ermilov <ru@nginx.com> 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_mo...
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.