Upstream Keepalive connection close

Gona nginx-forum at
Tue Jan 6 11:06:18 UTC 2015

I have Nginx server configured with couple of backend servers with keepalive
connections enabled.

I am trying to understand what will be the Nginx's behaviour in case the
connection is closed by an upstream server legitimately when Nginx is trying
to send a new request exactly at the same time. In this race condition, does
Nginx re-try the request internally or does it return an error code?

In case Nginx needs to be forced to retry, should I be using
proxy_next_upstream? My understanding is that this setting will make the
request re-tried on the next server in the upstream block. On the same note,
how do I force the retry on the failed server first to avoid cache misses.


Posted at Nginx Forum:,255966,255966#msg-255966

More information about the nginx mailing list