Nginx负载均衡配置文件样例
upstream backend-others { server 10.x.x.x max_fails=0 fail_timeout=10s; server 10.x.x.x:81 max_fails=0 fail_timeout=10s; keepalive 20000; } location / { #防止502以及Timeout的发生 proxy_connect_timeout 75; proxy_read_timeout 300; proxy_send_timeout 300; proxy_buffer_size 64k; proxy_buffers 4 64k; proxy_busy_buffers_size 128k; proxy_temp_file_write_size 128k; proxy_http_version 1.1; proxy_set_header Connection ""; proxy_pass http://backend-others; }
参考:
http://www.cnblogs.com/shengs/p/4701905.html