LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

How to flush UDP connections

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: How to flush UDP connections
From: Ashish Jain <ajain@xxxxxxxxxxx>
Date: Fri, 21 Oct 2005 17:10:47 -0400
I have a 3 node (1 dir, 2 RS) LVS-DR test set up, which works perfectly fine. I am using it to load balance VoIP calls (SIP only).

My set up:
kernel: 2.6.8.1
ipvsadm vesion: 1.24-102
ipvs version: 1.20
services: all are non-persistent UDP (right now I have 2 services configured)

I have few question:

1. The load balancer works fine the way I expected for one one thing:

Sometimes after heavy load surge (500 UDP packets per sec. on the same connection) , the output of ipvsadm -l -c shows active UDP connections even if there is no traffic and I stop sending any UDP packets.

In ipvsadm, the default UDP connection timout is set to 300 sec (I did not change that. I did not even use persistant flag). I expect these connections to go away after 300 seconds. But after the 300 sec timer expires, it gets reset to 60 sec and these active UDP connectiosn stay forever. What could be the reason?

I have noticed from the ip_vs code (ip_vs_conn.c) that there are 2 functions implemented to expire a connection: ip_vs_conn_expire (This one resets the timer to 60*Hz if the reference count for this connection is greater than 1 or these is error deleting connection from hash tab)
ip_vs_conn_expire_now (Deletes the connection immediately)

The function called after timer expires is ip_vs_conn_expire and not the second one. Why is this so?


2. There is no option in ipvsadm to flush these connections as well. how can I flush these connections?

There is already a function implemented in ip_vs code to flush all connections but there is no socket option provided there do the same. The only socket option to flush is to flush the rules and not the connections. Why is it so?

3. I tried to enable the debug flag for ipvs in sysctl but doesn't seem like ipvs was build with debug flags on. How can I turn on debugging for ip_vs?

Ashish Jain


<Prev in Thread] Current Thread [Next in Thread>