18-使用Keepalived提高Nginx吞吐量
使用Keepalived提高吞吐量
可以使用keepalived设置长连接, 减少连接的创建和关闭, 提高吞吐量
设置方式
upstream tomcats { server 192.168.247.136:8001; server 192.168.247.136:8002; server 192.168.247.136:8003; # 保持32个长连接 keepalive 32; } server{ listen 80; server_name www.tomcat.com; location / { proxy_pass http://tomcats; proxy_http_version 1.1; proxy_set_header Connection ""; } }