Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 44101 invoked from network); 27 Apr 2010 18:41:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Apr 2010 18:41:05 -0000 Received: (qmail 93655 invoked by uid 500); 27 Apr 2010 18:41:05 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 93636 invoked by uid 500); 27 Apr 2010 18:41:05 -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 93628 invoked by uid 99); 27 Apr 2010 18:41:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 18:41:05 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of avinash.lakshman@gmail.com designates 209.85.160.48 as permitted sender) Received: from [209.85.160.48] (HELO mail-pw0-f48.google.com) (209.85.160.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Apr 2010 18:40:59 +0000 Received: by pwi7 with SMTP id 7so10057691pwi.35 for ; Tue, 27 Apr 2010 11:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=RmCLGSINzye86ZUdaV8sAEkUnKZSZV//v8jxKpmr10Y=; b=D7tdTyOZYybBag42kMkYYT3WPaag8/5hAlPi6g4LWf7QQxsEVyUmj1WyEjyFO6SwgZ 7RWPer55apBPaYCsN8BYdbKXotKaKy5SxG+y8RhJ6wqZJeyNtvPBGTHCCD3jV4pUv903 m+gb4fYdDYQ9xPdUIuccC3IEttYzY0Xfn+qdY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gL2emAmUpsjJ5e/R1TnIMYxdIu0j015MUIg8WYlcbAF/cpKQe0GWpNJtAsBPxKKcck lqX7ZwLh+DAm4qYFIVszE5pshZ1Lx1eaigBC8bQ5TNqVVGChAGuwulNRTAxrLSpv+KR9 veY7kxYOLgyt/qUMxwS6+ugBvEe+VQ3B39Uz8= MIME-Version: 1.0 Received: by 10.141.107.9 with SMTP id j9mr6508479rvm.177.1272393634634; Tue, 27 Apr 2010 11:40:34 -0700 (PDT) Received: by 10.231.161.207 with HTTP; Tue, 27 Apr 2010 11:40:34 -0700 (PDT) In-Reply-To: References: Date: Tue, 27 Apr 2010 11:40:34 -0700 Message-ID: Subject: Re: Zookeeper client From: Avinash Lakshman To: zookeeper-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=000e0cd1391a9b61df04853c3ae1 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd1391a9b61df04853c3ae1 Content-Type: text/plain; charset=ISO-8859-1 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 > > --000e0cd1391a9b61df04853c3ae1--