Welcome! Log In Create A New Profile

Advanced

Re: proxy_read_timeout vs proxy_next_upstream_timeout

B.R.
March 29, 2016 01:14PM
Those directives works at very different levels.

proxy_next_upstream_timeout
<http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream_timeout>
allocates a time for nginx to find a proper upstream (configured with
proxy_next_upstream
<http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_next_upstream>
).
By default, there is no limit, making nginx attempting every upstream one
after the other until finding one healthy or running out of valid
upstreams, which could take a while (maybe even an infinite time with
health checks? Speculating here).

proxy_read_timeout
<http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_read_timeout>
sets a timer 'between two read operations', say the docs, which is closer
to your question.
Those are to be defined, but I suppose that when there is nothing more to
read in the buffer awaiting backend response, and the response is not
complete, this timer kicks in and effectively close the connection,
returning an error.

​They are not working at the same level at all: there is no way to mistake
one for the other.​
---
*B. R.*

On Tue, Mar 29, 2016 at 5:03 PM, Frank Liu <gfrankliu@gmail.com> wrote:

> Hi
>
> If you set read timeout 2 min and next upstream timeout 50 seconds, will
> nginx break the current connection at 50 second or will it let the read
> finish until 2min?
>
> Thanks
> Frank
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_read_timeout vs proxy_next_upstream_timeout

Frank Liu March 29, 2016 11:06AM

Re: proxy_read_timeout vs proxy_next_upstream_timeout

B.R. March 29, 2016 01:14PM

Re: proxy_read_timeout vs proxy_next_upstream_timeout

Frank Liu March 31, 2016 12:56PM

Re: proxy_read_timeout vs proxy_next_upstream_timeout

B.R. March 31, 2016 06:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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