Welcome! Log In Create A New Profile

Advanced

Re: nginx timeout aborting subsequent proxying from upstream block

Mauri, Richard
December 20, 2016 01:34PM
This is question about configuring nginx so that when you have multiple servers in an upstream block and the first one selected to handle a request "times out" (at default 60s) that we can skip the forwarding to subseqnt servers in the upstream block.

We see the case where the upstream_response_time in nginx log shows like 60s,60s.

We have a client that aborts the request/connection at 20sec and other clients that ultimately fail because the server responded with failure with the 60s,60s upstream_response time.

We want to institutionalize the aggregate 20s round trip client request time at the server side if possible.

In other words we don't want to configure the proxy read and write timeout settings to 20 as this might result in total of 40s as observed by the client.

We don't want to set the seetings to like 10s as that may not give the server enough time to complete processing.

Rather we want the proxy read write timeouts to be 20s and the entire request to fail immediately without going to the next server in the upstream block.

How is nginx configured so if the first upstream server times-out; then subsequent servers are not consulted and the server effectively timeout at 20?

I hope this makes sense
Thanks


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

Re: nginx timeout aborting subsequent proxying from upstream block

Mauri, Richard December 20, 2016 01:34PM

Re: nginx timeout aborting subsequent proxying from upstream block

Maxim Dounin December 20, 2016 02:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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