Keepalived & LVS
- 软件级负载均衡器(LVS/HAProxy/Nginx)的特点简介和对比
- CentOS安装keepalived & LVS
- Keepalived原理与实战精讲
- lvs+keepalived使用总结
- keepalived_misc_check
- keepalived_lvs_conf
- lvs_nat
- lvs_tun
- lvs的持久连接
- lvs_rrd生成监控图形
- Heartbeat
- LVS IRQ引起网卡性能问题与Google RPS和RFS优化
- LVS怪异网络延迟现象与GRO/LRO
- IPVS_FULLNAT_and_SYNPROXY
- 《一篇搞懂》系列之二——IPVS: https://zhuanlan.zhihu.com/p/627514565
- Layer4 session concurrency(Haproxy and LVS): http://www.mail-archive.com/haproxy@formilux.org/msg07116.html
-
查看内核中包含的包含IP_VS模组
grep "CONFIG_IP_VS" /boot/config-$(uname -r) CONFIG_IP_VS=m CONFIG_IP_VS_IPV6=y # CONFIG_IP_VS_DEBUG is not set CONFIG_IP_VS_TAB_BITS=12 CONFIG_IP_VS_PROTO_TCP=y CONFIG_IP_VS_PROTO_UDP=y CONFIG_IP_VS_PROTO_AH_ESP=y CONFIG_IP_VS_PROTO_ESP=y CONFIG_IP_VS_PROTO_AH=y CONFIG_IP_VS_PROTO_SCTP=y CONFIG_IP_VS_RR=m CONFIG_IP_VS_WRR=m CONFIG_IP_VS_LC=m CONFIG_IP_VS_WLC=m CONFIG_IP_VS_LBLC=m CONFIG_IP_VS_LBLCR=m CONFIG_IP_VS_DH=m CONFIG_IP_VS_SH=m CONFIG_IP_VS_SED=m CONFIG_IP_VS_NQ=m CONFIG_IP_VS_FTP=m
-
timeout特性
1.非:0端口连接:expire以ipvsadm -L --timeout中设置为准。 2.为:0端口连接:expire以persistence_timeout 180为准。但网上有反馈:存在逐渐减少后又自动恢复为1分钟现象。 ipvsadm -Lcn|more IPVS connection entries pro expire state source virtual destination TCP 00:15 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 04:01 ESTABLISHED 10.201.36.11:48851 172.22.16.5:9012 172.22.16.28:9012 TCP 00:56 NONE 10.201.114.163:0 172.22.16.5:9012 172.22.16.28:9012 TCP 07:56 ESTABLISHED 10.201.69.90:50035 172.22.16.5:9012 172.22.16.27:9012 TCP 00:46 NONE 10.201.155.85:0 172.22.16.5:9012 172.22.16.28:9012 TCP 00:45 NONE 10.201.14.187:0 172.22.16.5:9012 172.22.16.27:9012 TCP 00:09 NONE 10.201.155.138:0 172.22.16.5:9012 172.22.16.27:9012 TCP 00:08 NONE 10.201.35.121:0 172.22.16.5:9012 172.22.16.28:9012 TCP 11:23 ESTABLISHED 10.201.44.187:36421 172.22.16.5:9012 172.22.16.27:9012 TCP 14:43 ESTABLISHED 10.201.77.215:38165 172.22.16.5:9012 172.22.16.28:9012 TCP 11:44 ESTABLISHED 10.201.13.225:37362 172.22.16.5:9012 172.22.16.27:9012 TCP 03:09 ESTABLISHED 10.201.164.189:49682 172.22.16.5:9012 172.22.16.27:9012 TCP 13:49 ESTABLISHED 10.201.83.121:51278 172.22.16.5:9012 172.22.16.27:9012 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:31 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -L --timeout Timeout (tcp tcpfin udp): 900 120 300 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:47 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:42 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:39 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:58 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:36 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:33 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:58 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:31 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:58 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:26 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:23 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:58 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:19 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:58 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:15 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:58 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:12 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:08 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:06 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:01 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:58 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226 ipvsadm -Lcn|grep 10.201.111.201 TCP 00:54 NONE 10.201.111.201:0 172.22.16.5:9226 172.22.16.33:9226 TCP 14:59 ESTABLISHED 10.201.111.201:59873 172.22.16.5:9226 172.22.16.33:9226