lvs配置会话超时时间

查看当前超时时间配置:
ipvsadm -l --timeout

修改超时时间:

  1. 内存中修改(重启会丢失)

ipvsadm --set 300 10 10

  1. 持久化配置(升级可能会丢失)
vim /etc/keepalived/keepalived.conf
global_defs {
lvs_timeouts tcp 300 tcpfin 10 udp 10
lvs_sync_daemon <INTERFACE> <VRRP_INSTANCE>
}

重启生效

systemctl reload keepalived

参考 https://ieevee.com/tech/2017/08/15/lvs-persistence.html

posted @ 2021-04-27 15:04  Jneeee  阅读(781)  评论(0编辑  收藏  举报