On Mon, 3 Jun 2002 stefano.mason@xxxxxxxxxxxx wrote:
>
> Someone can help me to make some ligth on the following issue?
>
> Environment:
> On 2 PC with linux 2.4.18 and ipvs 1.0.2 compiled as module (today I try
> also ipvs-1.0.3), both configured for LVS cluster, besides I use
> "connections sync.".
>
> LVS1:
> [root@lvs1 root]# ipvsadm -l --timeout
> Timeout (tcp tcpfin udp): 3600 120 300
>
> [root@lvs1 root]# ps -fe |grep ipvs
> root 509 1 0 15:50 ? 00:00:00 [ipvs syncmaster]
>
>
>
> LVS2:
> [root@lvs2 root]# ipvsadm -l --timeout
> Timeout (tcp tcpfin udp): 3600 120 300
>
> [root@lvs2 root]# ps -fe |grep ipvs
> root 24023 1 0 15:52 ? 00:00:00 [ipvs syncbackup]
>
>
> ISSUE:
> When the primary lvs receive a connection the master set the timeout
> connection to 3600s but on the backup the timeout of the connection is set
> to 180s.
>
> [root@lvs1 root]# ipvsadm -lc
> IPVS connection entries
> pro expire state source virtual destination
>
> TCP 59:59.66 ESTABLISHED 53.212.7.161:1555 saprouter.unix.debis.it:3299
> nefe.unix.debis.it:3299
> TCP 01:51.37 FIN_WAIT 53.212.7.161:1554 saprouter.unix.debis.it:3299
> nefe.unix.debis.it:3299
>
>
> [root@lvs2 root]# ipvsadm -lc
> IPVS connection entries
> pro expire state source virtual destination
>
> TCP 02:57.94 ESTABLISHED 53.212.7.161:1555 saprouter.unix.debis.it:3299
> nefe.unix.debis.it:3299
> TCP 02:57.94 ESTABLISHED 53.212.7.161:1554 saprouter.unix.debis.it:3299
> nefe.unix.debis.it:3299
>
>
> After 180s:
>
> [root@lvs1 root]# ipvsadm -lc
> IPVS connection entries
> pro expire state source virtual destination
>
> TCP 55:49.63 ESTABLISHED 53.212.7.161:1555 saprouter.unix.debis.it:3299
> nefe.unix.debis.it:3299
>
>
> [root@lvs2 root]# ipvsadm -lc
> IPVS connection entries
> pro expire state source virtual destination
>
> [root@lvs2 root]#
>
>
> Any clue about the diffent timeout?
>
Current IPVS connection synchronization is simple, it doesn't synchronize
every state change of a connection (such as keep changing its timeout
after receiving new packets), because it would be too much synchronization
message if we would do this. So, it simply sychronizes ESTABLISHED
connections to the backup load balancer. The backup load balancer receives
the messages and create the connection with the IP_VS_SYNC_CONN_TIMEOUT
(3*60*HZ). If the master keep receiving the packets from a sychronized
connection, the master will synchronize the connection again every other
50 incoming packets, so the backup can keep the connection in the system.
The current synchronization scheme is mostly for web services.
The result that you gave is right with the current scheme. Maybe you can
adapt the parameters in the source code directly for your application.
Regards,
Wensong
|