lvs配置会话超时时间
查看当前超时时间配置:
ipvsadm -l --timeout
修改超时时间:
- 内存中修改(重启会丢失)
ipvsadm --set 300 10 10
- 持久化配置(升级可能会丢失)
vim /etc/keepalived/keepalived.conf
global_defs {
lvs_timeouts tcp 300 tcpfin 10 udp 10
lvs_sync_daemon <INTERFACE> <VRRP_INSTANCE>
}
重启生效
systemctl reload keepalived