nginx 使用 keepalived 提高吞吐量
nginx
it书童
2020-12-12 21:47:15
0赞
0踩
1127阅读
0评论
keepalived 能将部分连接转为长连接,减少了连接创建、关闭的损耗
开启前:
开启后:
upstream tomcats {
# server 192.168.33.11:8080 max_fails=2 fail_timeout=15s;
# server 192.168.33.12:8080;
server 192.168.33.13:8080;
keepalive 32;
}
server {
listen 80;
server_name www.tomcats.com;
location / {
proxy_pass http://tomcats;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}
明显看到吞吐量提升不少

关于我
一个文科出身的程序员,追求做个有趣的人,传播有价值的知识,微信公众号主要分享读书思考心得,不会有代码类文章,非程序员的同学请放心订阅
转载须注明出处:https://www.itshutong.com/articles/951
精品付费
这一次,真正掌握composer
2602
0
个人开发者通过payjs接入微信支付
4815
0
相关推荐
nginx配置网站访问密码
1130
0
nginx location 实例详解
1146
0
nginx 基础知识
1161
0
nginx 按天切割日志
1271
0
nginx 防盗链
1068
0
nginx 构建 tomcat 集群
965
0
upstream 指令参数 max_conns
1513
0
upstream 指令参数 down 与 backup
1088
0
nginx 控制浏览器缓存
1010
0
nginx 的反向代理缓存
1053
0