LVS TCP connection timeouts - lingering connections

Posted by Jon Topper on Server Fault See other posts from Server Fault or by Jon Topper
Published on 2009-08-10T14:51:50Z Indexed on 2011/11/12 1:56 UTC
Read the original article Hit count: 901

Filed under:
|

I'm using keepalived to load-balance connections between a number of TCP servers. I don't expect it matters, but the service in this case is rabbitmq. I'm using NAT type balancing with weighted round-robin.

A client connects to the server thus:

[client]-----------[lvs]------------[real server]
            a                b

If a client connects to the LVS and remains idle, sending nothing on the socket, this eventually times out, according to timeouts set using ipvsadm --set. At this point, the connection marked 'a' above correctly disappears from the output of netstat -anp on the client, and from the output of ipvsadm -L -n -c on the lvs box. Connection 'b', however, remains ESTABLISHED according to netstat -anp on the real server box.

Why is this? Can I force lvs to properly reset the connection to the real server?

© Server Fault or respective owner

Related posts about load-balancing

Related posts about lvs