Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 95976 invoked from network); 27 Apr 2010 20:17:33 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Apr 2010 20:17:33 -0000 Received: (qmail 10589 invoked by uid 500); 27 Apr 2010 20:17:33 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 10564 invoked by uid 500); 27 Apr 2010 20:17:33 -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 10556 invoked by uid 99); 27 Apr 2010 20:17:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 20:17:33 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=10.0 tests=AWL,RCVD_IN_DNSWL_NONE,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, 27 Apr 2010 20:17:26 +0000 Received: from SNV-EXBH01.ds.corp.yahoo.com (snv-exbh01.ds.corp.yahoo.com [207.126.227.249]) by mrout1-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id o3RKGbIr012043 for ; Tue, 27 Apr 2010 13:16:40 -0700 (PDT) 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=KRCxrL74lb4PZWV22FuEiMBu4uvHzAyUREU8MltYTsWMROxUC9VCFtwxyrDqN2Cw Received: from SNV-EXVS09.ds.corp.yahoo.com ([207.126.227.86]) by SNV-EXBH01.ds.corp.yahoo.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 27 Apr 2010 13:16:37 -0700 Received: from 10.73.146.106 ([10.73.146.106]) 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, 27 Apr 2010 20:16:08 +0000 User-Agent: Microsoft-Entourage/12.24.0.100205 Date: Tue, 27 Apr 2010 13:16:07 -0700 Subject: Re: Zookeeper client From: Mahadev Konar To: Message-ID: Thread-Topic: Zookeeper client Thread-Index: AcrmRngRI9QdjSl4yU+6ODLgvrIZ2w== In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 27 Apr 2010 20:16:37.0906 (UTC) FILETIME=[8A7D7F20:01CAE646] Hi Avinash, No, the randomization only happens on the list of servers that are passed to the client. If you just pass A to the client, the client will only be able to connect to A and will not know about the other servers. Does that help? Thanks mahadev On 4/27/10 11:40 AM, "Avinash Lakshman" wrote: > Thanks Mahadev. Does this happen irrespective of what I provide in the > connect string? Let's say I have servers A, B, C, D and E in the ZK cluster. > But all my clients instantiate ZooKeeper instances by providing information > only about A. Does the randomization occur even in this case? > > Thanks > Avinash > > On Tue, Apr 27, 2010 at 11:00 AM, Mahadev Konar wrote: > >> HI Avinash, >> The zk client does itself maintain liveness information and also >> randomizes the list of servers to balance the number of clients connected >> to >> a single ZooKeeper server. >> >> Hope that helps. >> >> Thanks >> mahadev >> >> >> On 4/27/10 10:56 AM, "Avinash Lakshman" >> wrote: >> >>> Let's assume I have 100 clients connecting to a cluster of 5 Zookeeper >>> servers over time. On the client side I instantiate a ZooKeeper instance >> and >>> use it whenever I need to read/write into ZK. Now I know I can pass in a >>> connect string with the list of all servers that make up the ZK cluster. >>> Does the ZK client automatically maintain liveness information and load >>> balance my connections across the machines? How can I do this >> effectively? I >>> basically want to spread the connections from the 100 clients to the 5 ZK >>> instances effectively. >>> >>> Thanks >>> Avinash >> >>