Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] connection broken during two hours by using LVS as load balancer

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


rich4tech at yahoo

Jun 26, 2008, 11:16 AM

Post #1 of 3 (541 views)
Permalink
[lvs-users] connection broken during two hours by using LVS as load balancer

Hello, All
I developed a Client/Server program in which client will establish a persistent connection with Server and then client and server will maintain this connection for a very long time. this week, I use LVS as load balancer. I found that the connection between Client and Server are broken at the exact two hours. if I don't use the LVS, the connection never break under the same environment. For this LVS, the packet forwarding method is gatewaying, the scheduler which I tried is lblc, I also tried --persistent. they have same results. Does anyone have such experience? could anyone explain why that happened and tell me how to avoid. thank you very much in advance.

Richard





_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


rich4tech at yahoo

Jun 26, 2008, 11:21 AM

Post #2 of 3 (512 views)
Permalink
[lvs-users] connection broken during two hours by using LVS as load balancer [In reply to]

Hello, All
I developed a Client/Server program in which client will
establish a persistent connection with Server and then client and
server will maintain this connection for a very long time. this week, I
use LVS as load balancer. I found that the connection between Client
and Server are broken at the exact two hours. if I don't use the LVS,
the connection never break under the same environment. For this LVS,
the packet forwarding method is gatewaying, the scheduler which I tried
is lblc, I also tried --persistent. they have same results. Does
anyone have such experience? could anyone explain why that happened and
tell me how to avoid. thank you very much in advance.

Richard



_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


j.stubbs at linkthink

Jun 26, 2008, 5:53 PM

Post #3 of 3 (505 views)
Permalink
Re: [lvs-users] connection broken during two hours by using LVS as load balancer [In reply to]

On Friday 27 June 2008 03:21:02 richard zhao wrote:
> Hello, All
> I developed a Client/Server program in which client will
> establish a persistent connection with Server and then client and
> server will maintain this connection for a very long time. this week, I
> use LVS as load balancer. I found that the connection between Client
> and Server are broken at the exact two hours. if I don't use the LVS,
> the connection never break under the same environment. For this LVS, 
> the packet forwarding method is gatewaying, the scheduler which I tried
> is lblc, I also tried --persistent. they have same results.  Does
> anyone have such experience? could anyone explain why that happened and
> tell me how to avoid. thank you very much in advance.

It sounds like the tcp session timeout, which is configurable with
ipvsadm --set. However, after a search I found the defaults in
ip_vs_proto_tcp.c in the kernel:

static int tcp_timeouts[IP_VS_TCP_S_LAST+1] = {
[IP_VS_TCP_S_NONE] = 2*HZ,
[IP_VS_TCP_S_ESTABLISHED] = 15*60*HZ,
[IP_VS_TCP_S_SYN_SENT] = 2*60*HZ,
[IP_VS_TCP_S_SYN_RECV] = 1*60*HZ,
[IP_VS_TCP_S_FIN_WAIT] = 2*60*HZ,
[IP_VS_TCP_S_TIME_WAIT] = 2*60*HZ,
[IP_VS_TCP_S_CLOSE] = 10*HZ,
[IP_VS_TCP_S_CLOSE_WAIT] = 60*HZ,
[IP_VS_TCP_S_LAST_ACK] = 30*HZ,
[IP_VS_TCP_S_LISTEN] = 2*60*HZ,
[IP_VS_TCP_S_SYNACK] = 120*HZ,
[IP_VS_TCP_S_LAST] = 2*HZ,
};

Established connections expire after 15 minutes of inactivity by default.
Unless your distribution has changed it of course... I'd experiment with
using ipvsadm --set to confirm that it is the issue. And if it is, I guess
the next question would be "is it possible to disable timeouts on
established session?" That, I don't know.

--
Jason Stubbs <j.stubbs [at] linkthink>
LINKTHINK INC.
東京都渋谷区桜ヶ丘町22-14 N.E.S S棟 3F
TEL 03-5728-4772 FAX 03-5728-4773

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.