HTTP: add connect_timeout for proxy_next_upstream

Maxim Dounin mdounin at
Mon Mar 25 17:06:11 UTC 2019


On Sun, Mar 24, 2019 at 04:57:54PM +0800, 吕海涛 wrote:

> commit c6f872f4dfa4abecc953f09cdb3e1537d866d2f4
> Author: 吕海涛 <lv at>
> Date:   Sun Mar 24 16:46:56 2019 +0800
>     HTTP: add connect_timeout for proxy_next_upstream
>     Nginx support both timeout and non_idempotent flag for
>     proxy_next_upstream.  However, in some environment,
>     even the GET method is non_idempotent.
>     We need nginx try the next upstream if and only if the
>     tcp connect is timeout.

Thank you for your patch.

If GET requests are not idempotent in your environment, you have a 
serious problem regardless of nginx request handling, as browsers 
and other clients will not consider these requests non-idempotent, 
and will re-try requests as needed.  You may want to re-engineer 
your request handling instead of trying to introduce workarounds 
in nginx.


Maxim Dounin

More information about the nginx-devel mailing list