keepalived的udp配置问题
UDP healthchecker的超时时间至少配置4秒以上,否则无法探测到服务器关机
Please see the description of the UDP healthchecker in the keepalived.conf(5) man page:
# UDP healthchecker
# Note: for this checker to work properly, it relies on ICMP error messages such as
# HOST_UNREACH, NET_UNREACH, PORT_UNREACH. HOST_UNREACH relies on ARP requests
# timing out, and so connect_timeout should be long enough to allow for this (e.g.
# at least 4 seconds).
You have specified a connect_timeout of 1, but as stated above the timeout needs to be at least 4 seconds for the ARP request to time out.