zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joey Echeverria <joe...@gmail.com>
Subject Re: Recommended session timeout
Date Tue, 24 Feb 2009 07:37:36 GMT
Thanks for the link to the documentation. I've been running tests with
a 5 second session timeout and disconnect events appear frequent. The
network they're operating on is generally quite, but the disconnects
to correlate with an increase in activity (e.g. loading data into the

Does this seem normal to you or does it imply a potential
configuration problem on my network?

On a related topic, I was reading the 3.1 client source code,
particularly the reconnect source, and noticed that the client sleeps
for up to 1 second before trying to reconnect. This seems excessive
and with a 5 second session timeout leads to more frequent session
expirations. Almost every time it sleeps for more than about 800 ms, a
disconnect is followed by an expiration.

Is this a bug, or desirable behavior?



On Mon, Feb 23, 2009 at 10:37 PM, Patrick Hunt <phunt@apache.org> wrote:
> The latest docs (3.1.0 has some updates to that section) can be found here:
> http://hadoop.apache.org/zookeeper/docs/r3.1.0/zookeeperProgrammers.html#ch_zkSessions
> Patrick
> Mahadev Konar wrote:
>> Hi Joey,
>>  here is a link to information on session timeouts.
>> http://hadoop.apache.org/zookeeper/docs/r3.0.1/zookeeperProgrammers.html#ch_
>> zkSessions
>>  The session timeouts depends on how sensitive you want your application
>> to
>> be. A very low session timeout like (1-2 seconds) might lead to your
>> application being very sensitive to events like minor network problems
>> etc.,
>> a higher values of say (30 seconds) on the other hand might lead to slow
>> detection of client failures -- example one of the zookeeper client which
>> has ephemeral node goes down, in this case the ephemeral nodes will only
>> go
>> away after session timeout.
>> I have seen some users using 10-15 seconds of session timeout, but you
>> should use as per your application requirements.
>> Hope this helps.
>> mahadev
>> On 2/22/09 3:09 AM, "Joey Echeverria" <joey42@gmail.com> wrote:
>>> Is there a recommended session timeout? Does it change based on the
>>> ensemble size?
>>> Thanks,
>>> -Joey

View raw message