配置keepalived提供吞吐量
-
keepalived : 设置长连接处理的数量
-
proxy_http_version :设置长连接http版本为1.1
-
proxy_set_header :清除connection header 信息
upstream tomcats {
server 192.168.31.96:8088;
server 192.168.31.226:8088;
server 192.168.31.23:8088;
# 设置长连接处理的数量
keepalive 32;
}
server {
listen 80;
server_name www.shop.com;
location / {
proxy_pass http://tomcats;
# 设置长连接http版本为1.1
proxy_http_version 1.1;
# 清除connection header 信息
proxy_set_header Connection "";
}
}
}