How does Nginx handle the request of the upstream server when it is marked as `down`?

For a simple Nginx configuration like this:
For a simple Nginx configuration like this:

upstream myservers {
server {
listen 80;
location / {
proxy_pass http://myservers;
I have two questions related zero downtime of the application:

If I change the configuration to mark the first server server
as down, I assume that no new request will go to that server, but what
the current request that is handled by the upstream server? Does Nginx
still return valid response to end user for that request?

If I remove the first server server and reload the
configuration, what about the current request that is handled by this
upstream server?

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


On Mon, Apr 13, 2015 at 04:16:56AM -0400, HUMing wrote:

    proxy_pass http://myservers;

upstream server?
Both removal of the server and marking it down are equivalent as
long as you are using round-robin balancing (there is a difference
when using ip_hash and hash balancers, as “down” implies less
remapping when temporary disabling a server).

In both cases the server won’t be used by new worker processes to
handle new requests, and old worker processes will gracefully
terminate upon completion of previously started requests.

See here for details:

Maxim D.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs