Mastering Nginx

(Ron) #1

Reverse Proxy Advanced Topics


[ 100 ]

Alternatively, perhaps it is time for scheduled maintenance on a particular upstream


server, so it should not receive any new requests. By marking that server as down in
the configuration, we can proceed with that maintenance work:


The following configuration describes how to mark the server down:


upstream app {

server 10.0.40.10;

server 10.0.40.20;

server 10.0.40.30 down;

}

Unresponsive upstream servers should be handled quickly. Depending on the


application, the timeout directives can be set aggressively low:


location / {

proxy_connect_timeout 5;

proxy_read_timeout 10;

proxy_send_timeout 10;

}
Free download pdf