Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 84536 invoked from network); 24 Feb 2009 07:56:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Feb 2009 07:56:56 -0000 Received: (qmail 47459 invoked by uid 500); 24 Feb 2009 07:56:56 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 47436 invoked by uid 500); 24 Feb 2009 07:56:56 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 47424 invoked by uid 99); 24 Feb 2009 07:56:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Feb 2009 23:56:56 -0800 X-ASF-Spam-Status: No, hits=3.0 required=10.0 tests=MIME_QP_LONG_LINE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [69.147.107.20] (HELO mrout1-b.corp.re1.yahoo.com) (69.147.107.20) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Feb 2009 07:56:46 +0000 Received: from SNV-EXPF01.ds.corp.yahoo.com (snv-expf01.ds.corp.yahoo.com [207.126.227.250]) by mrout1-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id n1O7tNJh043829; Mon, 23 Feb 2009 23:55:24 -0800 (PST) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=received:user-agent:date:subject:from:to:message-id: thread-topic:thread-index:in-reply-to:mime-version:content-type: content-transfer-encoding:return-path:x-originalarrivaltime; b=bseqgVNCc149xA/3ICE23enpYhB5TzwiI9vMHxH3P4dyxgGbgWL+aoI0wueauxF0 Received: from SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.87]) by SNV-EXPF01.ds.corp.yahoo.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 23 Feb 2009 23:55:23 -0800 Received: from 10.72.72.18 ([10.72.72.18]) by SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.84]) via Exchange Front-End Server snv-webmail.corp.yahoo.com ([207.126.227.59]) with Microsoft Exchange Server HTTP-DAV ; Tue, 24 Feb 2009 07:54:54 +0000 User-Agent: Microsoft-Entourage/12.15.0.081119 Date: Mon, 23 Feb 2009 23:54:53 -0800 Subject: Re: Recommended session timeout From: Mahadev Konar To: , Message-ID: Thread-Topic: Recommended session timeout Thread-Index: AcmWVS0c63DtDD1UxkqhhNIPdVgHvg== In-Reply-To: <92eebe280902232337v2c6e2064oe05775534939cc40@mail.gmail.com> Mime-version: 1.0 Content-type: text/plain; charset="ISO-8859-1" Content-transfer-encoding: quoted-printable X-OriginalArrivalTime: 24 Feb 2009 07:55:23.0284 (UTC) FILETIME=[3F297D40:01C99655] X-Virus-Checked: Checked by ClamAV on apache.org On 2/23/09 11:37 PM, "Joey Echeverria" wrote: > 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 > system). >=20 > Does this seem normal to you or does it imply a potential > configuration problem on my network? How many zookeeper quorum servers are you running? What is the config for the zookeeper servers? >=20 > 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. Can you point me to the code which you think does this? A client is suppose= d to disconnect itself from a server if it does not hear a response to its ping's within 1/3 of the session timeout. It should then reconnect to the other servers. Session expiration happening so frequently does indicate a problem. More information on your setup will help. Thanks mahadev >=20 > Is this a bug, or desirable behavior? >=20 > Thanks, >=20 > -Joey >=20 > On Mon, Feb 23, 2009 at 10:37 PM, Patrick Hunt wrote: >> The latest docs (3.1.0 has some updates to that section) can be found he= re: >> http://hadoop.apache.org/zookeeper/docs/r3.1.0/zookeeperProgrammers.html= #ch_z >> kSessions >>=20 >> Patrick >>=20 >> Mahadev Konar wrote: >>>=20 >>> Hi Joey, >>> =A0here is a link to information on session timeouts. >>>=20 >>> http://hadoop.apache.org/zookeeper/docs/r3.0.1/zookeeperProgrammers.htm= l#ch_ >>> zkSessions >>> =A0The session timeouts depends on how sensitive you want your applicatio= n >>> 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 slo= w >>> detection of client failures -- example one of the zookeeper client whi= ch >>> has ephemeral node goes down, in this case the ephemeral nodes will onl= y >>> go >>> away after session timeout. >>>=20 >>> I have seen some users using 10-15 seconds of session timeout, but you >>> should use as per your application requirements. >>>=20 >>> Hope this helps. >>> mahadev >>>=20 >>>=20 >>> On 2/22/09 3:09 AM, "Joey Echeverria" wrote: >>>=20 >>>> Is there a recommended session timeout? Does it change based on the >>>> ensemble size? >>>>=20 >>>> Thanks, >>>>=20 >>>> -Joey >>>=20 >>=20