Welcome! Log In Create A New Profile

Advanced

Re: max_fails=0 for server directive

Valentin V. Bartenev
October 16, 2017 11:52AM
On Sunday 15 October 2017 09:51:27 Ruben wrote:
> When setting max_fails=0 for all server directives used in upstream module.
> So for example:
>
> upstream chat-servers {
> hash $arg_chatName;
> server chat-1 max_fails=0;
> server chat-2 max_fails=0;
> server chat-3 max_fails=0;
> }
>
> Assume a certain ?chatName=xxx is directed to chat-2 server, and this
> server fails. Do I get an error for that connection or does it try chat-3
> server?
>
> I want it not to go to the next sever but to just fail. Is this the correct
> config?

No.

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

| The zero value disables the accounting of attempts.

| What is considered an unsuccessful attempt is defined by the
| proxy_next_upstream, fastcgi_next_upstream, uwsgi_next_upstream,
| scgi_next_upstream, and memcached_next_upstream directives.

http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream

| off
| disables passing a request to the next server.


wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

max_fails=0 for server directive

rsdrsd October 15, 2017 03:52AM

Re: max_fails=0 for server directive

Valentin V. Bartenev October 16, 2017 11:52AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 105
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready