nginx 使用 keepalived 提高吞吐量
nginx
it书童
2020-12-12 21:47:15
0赞
0踩
1207阅读
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
2679
0
个人开发者通过payjs接入微信支付
4929
0
相关推荐
nginx 备忘录
1266
0
nginx配置网站访问密码
1178
0
nginx 重写规则
1293
0
nginx location 实例详解
1201
0
nginx 配置文件详解
1472
0
nginx 基础知识
1213
0
nginx 按天切割日志
1319
0
nginx 反向代理
1140
0
nginx 解决跨域问题
1127
0
upstream 指令参数 max_conns
1617
0
upstream 指令参数 slow_start
1545
0
upstream 指令参数 down 与 backup
1213
0
负载均衡之ip_hash
1186
0
负载均衡之一致性hash算法
1095
0
nginx 控制浏览器缓存
1135
0