Nginx系列【upstream优化,单机tomcat性能提升一倍】

1.

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;

events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    upstream tomcat13 {
        server 192.168.26.130:8083;
        server 192.168.26.132:8083;
        keepalive 32;
    }
    server {
        listen       80;
        server_name  localhost;
        location / {
             proxy_pass http://tomcat13;
             proxy_http_version 1.1;
             proxy_set_header Connection "";
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}
愿你走出半生,归来仍是少年!
原文地址:https://www.cnblogs.com/hujunwei/p/15772274.html