Search code examples
haproxy

haproxy can't release tcp connection


first,my linux-server has 2 ips,one is 10.23.7.201, another is 10.23.7.200; the 10.23.7.200 is vip handle by keepalived. and i deploy a haproxy as my proxy server on the same host.
haproxy open 8500 for proxy consul.
client use python-cousul to connect haproxy port 8500 with long-polling.
after 10.23.7.200 is removed, but i still find a tcp connection

[root@localhost ]# ss state all | grep 13000
tcp    ESTAB      0      1991   10.23.7.200:8500                 172.18.156.42:13000 

how can i delete this connection? is any configuration on haproxy to avoid this situation?

Now 10.23.7.200 is not local ip, but why has a tcp conneciton which has a src add is 10.23.7.200?


Solution

  • Got it!

    set keepalived to socket to slove this problem