[lvs-users] ipvsadm + mysql question

Gary Smith gary.smith at holdstead.com
Wed Apr 21 00:28:59 BST 2010


I have configured IPVSADM on a server with two real nodes.  The nodes are running mysql.  What I have found is that return trips open up new connections (would could be indicative of a different problem).  The original connection still appears open on the mysql server for a long time (currently 8000 seconds).  On the client it sometimes sits in a closing state.

IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  10.80.55.11:3917 wlc persistent 300
  -> 10.80.50.3:3917              Masq    100    0          0
  -> 10.80.50.2:3917              Masq    100    0          0

I'm sure that others in the past have worked through this on mysql, but everything that I can find on mysql has more to do with keepalive and ldirectory than anything else.  In my case I don't need this.  All of the real servers are read only slaves, so keeping the most current one is not important in this case.  I set it for persistent connections, and when it appears to bind it to a single server, which is fine.  

When I set the applications to run against a single server, connections are opened, processed and closed within a few seconds.  On the balanced nodes, I see a FIN_WAIT2 on the real server side and a CLOSING on the client site.

Do I need to worry about this?  The time of these just seem to be longer than what I would expect from a normal close.

Any advice on how what the proper configuration should be?

Gary




More information about the lvs-users mailing list