Return-Path: X-Original-To: apmail-zookeeper-user-archive@www.apache.org Delivered-To: apmail-zookeeper-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D63E9563 for ; Thu, 16 May 2013 01:23:57 +0000 (UTC) Received: (qmail 68323 invoked by uid 500); 16 May 2013 01:23:56 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 68253 invoked by uid 500); 16 May 2013 01:23:56 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 68243 invoked by uid 99); 16 May 2013 01:23:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 May 2013 01:23:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of neoqing@gmail.com designates 209.85.216.49 as permitted sender) Received: from [209.85.216.49] (HELO mail-qa0-f49.google.com) (209.85.216.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 May 2013 01:23:51 +0000 Received: by mail-qa0-f49.google.com with SMTP id j11so88833qag.8 for ; Wed, 15 May 2013 18:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=zLcimdGT4g7JaxJTm2CKZ/hKU0j6Ly4I8v+dc5CAdbQ=; b=QFabHz9NamtCS+TpHdh2omvs8nZQ+ZUTZab9FdCqu/lwDgdhJAp6QJCPnVtZ3O7AIO Dmf6MEeeqMa+GueGFKEzrB3etAkdLP6qdL9aktBQ2FsHZ4rw57+KyyZswJTal1J9EVt6 R2tICht2WXfX6HoKSqK/QT5mU2C9cSjDnfNMX154/fjpHCcjlCAVX7tLt2/G4Y6fHb+x ucrhfANl0kPrSCk9bzKwLFgW9PCTeVMOTLn2cy4cnHNYNFyrVJLRi5i2dvsNIIAMhAGE P05JiB2LMEjYbaPvmGBOYjpMfKPGG/eJ1OVWkd+DyO3GM1hVF1EGZp6rntaHflhOQWNl 2iLw== MIME-Version: 1.0 X-Received: by 10.224.173.6 with SMTP id n6mr30061903qaz.46.1368667410109; Wed, 15 May 2013 18:23:30 -0700 (PDT) Received: by 10.49.106.65 with HTTP; Wed, 15 May 2013 18:23:30 -0700 (PDT) In-Reply-To: References: Date: Thu, 16 May 2013 09:23:30 +0800 Message-ID: Subject: Re: Use zookeeper as Load Blancer From: Neo Qing To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary=047d7b5d5b54cbb78f04dccbb63c X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d5b54cbb78f04dccbb63c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,Germ=E1n Blanco: Thanks for your detailed response, but my thought is little bit different compare with your point. Actually my thought is same as Bahman Kalali said, our service is based on ZooKeeper to implement a 'service discovery' service. Thanks for your suggestion, I'll keep that in my mind. Neo On Thu, May 16, 2013 at 12:09 AM, German Blanco < german.blanco.blanco@gmail.com> wrote: > Hello Neo Qing, > > I am not the best expert, but I will try to help. > I understand that you want to have a ZooKeeper client connected to a > cluster and you wonder if there will be fail over and load balancing for > the requests coming from that client. If I didn't get the question right, > please correct me. > If I am not wrong, if the ZooKeeper client loses its connection it will t= ry > to reconnect to any of the servers that are indicated when you create the > ZooKeeper object, so there will be fail over. Of course, that will mean a > new connection. Some failures in the servers can be handled without the > client losing its connection, e.g. when a server other than the one you a= re > connected to goes down but there is still a quorum in the cluster. > Load Balancing for ZooKeeper write requests coming from clients wouldn't > help because all request need to go through the leader. Load Balancing of > read request could be achieved if the ZooKeeper clients connections are > balanced between the servers of the cluster, but not for a single client > connection. > > I hope that helps. Anybody, please correct me if I got anything wrong. > Cheers, > > Germ=E1n Blanco. > > > > On Wed, May 15, 2013 at 7:26 AM, Neo Qing wrote: > > > Hi,There > > I'm new to zookeeper, currently I'm working on a project, I have a > > cluster of server, client need to connection server (TCP/IP), and we ne= ed > > to keep the connection long live. > > To do the fail over and load balance , I was wondering whether > zookeeper > > can handle this case, especially for long live connection. > > thanks in advance. > > > > Neo > > > --047d7b5d5b54cbb78f04dccbb63c--