Welcome! Log In Create A New Profile

Advanced

Re: proxy_next_upstream default

Valentin V. Bartenev
December 23, 2015 07:04AM
On Tuesday 22 December 2015 16:47:33 Tolga Ceylan wrote:
> Hi All,
>
> According to documentation, default for proxy_next_upstream flag is
> error + timeout + invalid_header
> even if these are not specified:
>
> http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream
>
[..]

By your link:

Default: proxy_next_upstream error timeout;


> However, looking at the ngx_http_proxy_module.c, I only see timeout/error
> as merged/set:
>
> https://github.com/nginx/nginx/blob/master/src/http/modules/ngx_http_proxy_module.c#L3065
>
> This means documentation is incorrect, so if "invalid_header" is not
> specified, nginx
> will not consider such cases as "unsuccessful" attempts, right?
>
[..]

The documentation is correct, it says: "error, timeout and invalid_header
are always considered unsuccessful attempts, even if they are not specified
in the directive".

This is not about the default value, this is about nginx behavior.
See the relevant part of the code:

http://hg.nginx.org/nginx/file/tip/src/http/ngx_http_upstream.c#l2141
http://hg.nginx.org/nginx/file/tip/src/http/ngx_http_upstream.c#l2152
http://hg.nginx.org/nginx/file/tip/src/http/ngx_http_upstream.c#l3811

(note that the value of the directive isn't checked in this code path)

wbr, Valentin V. Bartenev

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

proxy_next_upstream default

Tolga Ceylan 1139 December 22, 2015 07:48PM

Re: proxy_next_upstream default

Valentin V. Bartenev 389 December 23, 2015 07:04AM

Re: proxy_next_upstream default

Tolga Ceylan 314 December 23, 2015 08:26PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 230
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