作用:提高吞吐量
    keepalived: 设置长连接处理的数量
    proxy_http_version:设置长连接http版本为1.1
    proxy_set_header:清除connection header 信息

    1. upstream tomcats {
    2. # server 192.168.1.173:8080 max_fails=2 fail_timeout=1s;
    3. server 192.168.1.190:8080;
    4. # server 192.168.1.174:8080 weight=1;
    5. # server 192.168.1.175:8080 weight=1;
    6. keepalive 32;
    7. }
    8. server {
    9. listen 80;
    10. server_name www.tomcats.com;
    11. location / {
    12. proxy_pass http://tomcats;
    13. proxy_http_version 1.1;
    14. proxy_set_header Connection "";
    15. }
    16. }