LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] LVS Sleep after a period of Time

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] LVS Sleep after a period of Time
From: Malcolm Turnbull <malcolm@xxxxxxxxxxxxxxxx>
Date: Sat, 16 Mar 2019 13:42:52 +0000
Tang,

You probably need to configure the tcp timeouts for LVS in the kernel:

To list the current timeouts:
root@lb1:~# ipvsadm -l --timeout
Timeout (tcp tcpfin udp): 900 120 300

To set different ones (in seconds):
ipvsadm --set 3600 120 300

To persist this over re-boots put the command in rc.local or somewhere
that runs at boot.

You can't set it to be forever (because that would cause a lot of
issues), most protocols have a keepalive to get around the timeout.
Timeout only counts down when you have idle connections.











On Fri, 15 Mar 2019 at 12:42, Khing Tiong Tang <tangkt@xxxxxxxxxx> wrote:
>
> Keepalived v1.2.10 (01/26,2014)
> Redhat linux 7.0
>
> If I left my login to the real server via the VIP for sometime, I refresh
> the client, there is a communication error. It seems like the LVS has a
> sleep time after idle for sometime. May I know if I can change the idle
> time to infinite?
> My Keepalived config:
> # virtual XM
> virtual_server 10.40.25.235 18010 {
>   delay_loop 1
>   lb_algo rr
>   lb_kind DR
>   protocol TCP
>
>   real_server 10.40.25.35 18010 {
>         TCP_CHECK {
>       connect_timeout 3
>     }
>   }
>
>   real_server 10.40.25.135 18010 {
>         TCP_CHECK {
>       connect_timeout 3
>     }
>   }
> }
> Thanks
> Reagrds...
>
> Tang Khing Tiong
> IBM Global Business Services
> Mobile: +65 98588291
> Email: tangkt@xxxxxxxxxx
>
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

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