LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: I think I found a minor bug in persistence time-outs.

To: Terry Green <tgreen@xxxxxxxxx>
Subject: RE: I think I found a minor bug in persistence time-outs.
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Julian Anastasov <ja@xxxxxx>
Date: Sat, 8 Feb 2003 04:21:35 +0200 (EET)
        Hello,

On Fri, 7 Feb 2003, Terry Green wrote:

> >     Yes, as implemented, the persistence timeout guarantees
> > afinity starting from the first connection. It lasts _after_ the
> > last connection from this "session" is terminated. There is still
> > no option to say "persistence time starts for each connection",
> > it could be useful.
> >
> Agree completely - however, I expected the template record to be reset
> to the session persistence time, not to the value of IP_VS_S_TIME_WAIT

        The persistence timeout is used only once: when the
first connection from this client is established. The current
meaning is the persistent time to cover period of time after
the client appears for first time. It is extended if there are
still active connections. Then there are 3 (or more) options:

1. extend it again with the persistent time
2. extend it with 2mins
3. use the persistence time after the last connection from client
terminates

        The second option is implemented, as it was expected from
other users :)

        Long time ago my opinion was that it is good the persistent
time to be used when the last connection terminates (3), config option
for the next releases if someone wants to implement it.

> >     May be you see it 20 seconds after the 2-minute cycle
> > is restarted. It is "reset" only when its timer expires, not when
> > the controlled connections expire.
>
> Nope - perhaps I wasn't clear... I was watching ipvsadm -Lc every second.
> I did the tests originally and saw the template record being reset to 2
> minutes if it expired with an active connection (even though the
> persistence setting for the connection was NOT 2 minutes).   Then I did
> another connect from the client, and the template record was reset again
> to 2 minutes (not the persistence setting again), suggesting the
> template record data structure had somehow had it's persistence time
> reset from the original setting to 2 minutes.

        Well, then it is not set to 1:40 but to 2:00 as expected.

> Then, to prove to myself that my reading of the source was accurate, I
> hacked the source to make IP_VS_TIME_WAIT 2*50*HZ instead of 2*60*HZ,
> and with the newly compiled kernel, the template record started being
> reset to 100 seconds when it expired with an active connection.

        True, your reading is accurate :) I now see why it was 1:40

> My expectation would have been that the template record's timer would
> get reset to the session persistence value rather than to
> IP_VS_TIME_WAIT.

        You can do it in your source tree or to implement it for other
users as config option. I don't know what the other people think.

> Terry Green

Regards

--
Julian Anastasov <ja@xxxxxx>



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