nginx conf is:
http {
large_client_header_buffers 8 8k;
proxy_buffers 8 8K;
proxy_buffer_size 8K;
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 2;
open_file_cache_errors on;
upstream backend {
server 10.10.2.100:8088 max_fails=200 fail_timeout=10;
server 10.10.2.101:8088 max_fails=200 fail_timeout=10;
server 10.10.2.102:8088 max_fails=200 fail_timeout=10;
server 10.10.2.103:8088 max_fails=200 fail_timeout=10;
}
server {
listen 80;
server_name _;
keepalive_timeout 60;
proxy_set_header Host $http_host;
proxy_connect_timeout 10;
proxy_read_timeout 10;
proxy_next_upstream error http_500 http_502 http_503 http_504;
add_header P3P "CP=CAO PSA OUR";
add_header Cache-Control "must-revalidate,no-cache,private";
location / {
proxy_pass http://backend;
}
}
}
On my production, in the cases a server of upstream response http_504, but the request doesn't to be transmitted to the next server, nginx response http 504 to client.