From user-return-8710-apmail-zookeeper-user-archive=zookeeper.apache.org@zookeeper.apache.org Tue Apr 14 13:11:03 2015 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 E8B7117942 for ; Tue, 14 Apr 2015 13:11:02 +0000 (UTC) Received: (qmail 68425 invoked by uid 500); 14 Apr 2015 13:11:02 -0000 Delivered-To: apmail-zookeeper-user-archive@zookeeper.apache.org Received: (qmail 68334 invoked by uid 500); 14 Apr 2015 13:11:02 -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 68316 invoked by uid 99); 14 Apr 2015 13:11:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2015 13:11:01 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of vikrant@yahoo-inc.com designates 98.139.253.104 as permitted sender) Received: from [98.139.253.104] (HELO mrout1-b.corp.bf1.yahoo.com) (98.139.253.104) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Apr 2015 13:10:36 +0000 Received: from omp1043.mail.ne1.yahoo.com (omp1043.mail.ne1.yahoo.com [98.138.89.251]) by mrout1-b.corp.bf1.yahoo.com (8.14.4/8.14.4/y.out) with ESMTP id t3ED7XFC052525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 14 Apr 2015 06:07:35 -0700 (PDT) Received: (qmail 73889 invoked by uid 1000); 14 Apr 2015 13:07:33 -0000 X-YMail-OSG: P8.ImOMVM1lyDokmlSnYDZxtlr_NKzW1SD5Ll32W.idqNGGwp0coo5.T76Zd2uT lLDqzXsRyGkNxv.uf8guNcsUQJde81KnHEH0s0kyesDHAf9gX4JblHrhjI0uGeUtArQFCgf.mhDE 1vspDmIhE26dHWSIO8o5PZP4mLIR2zt5c2be_xfZ1k2qhk1w856Oulauz7miBaXvgZ313._QHOwc aLeciD6JIKQ5qGb_krbx293VAgCemEmwx3NsCofhb_SJMOLKl8pw- Received: by 98.138.105.240; Tue, 14 Apr 2015 13:07:33 +0000 Date: Tue, 14 Apr 2015 13:07:31 +0000 (UTC) From: Vikrant Singh Reply-To: Vikrant Singh To: "user@zookeeper.apache.org" Message-ID: <1531657633.16773.1429016851703.JavaMail.yahoo@mail.yahoo.com> In-Reply-To: References: <1039024312.15054.1428968216451.JavaMail.yahoo@mail.yahoo.com> Subject: Re: Managing Watchers MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_16772_2103671938.1429016851700" X-Milter-Version: master.31+4-gbc07cd5+ X-CLX-ID: 016854002 X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_16772_2103671938.1429016851700 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you all for feedback. I think I understand your advise and will use l= eader election to solve this problem.ThanksVikrant=20 On Monday, 13 April 2015 4:55 PM, John Sirois = wrote: =20 On Mon, Apr 13, 2015 at 5:36 PM, Vikrant Singh < vikrant@yahoo-inc.com.invalid> wrote: > Hello zookeeper users,I am experimenting/prototyping a zookeeper > installation.One part of the same is a watchClient which monitor various > znodes (by applying watches) and perform some action according to trigger= ed > watch. > As part of plan we need to have multiple instances of this watchClient > running against same set of nodes. Idea is to have one client taking all > the load, while other is on standby mode.This is done primarily to make > sure that there is a backup capacity. If primary process dies, other > process (on standby) takes over the load. > The key phrase you're looking for is "leader election".=C2=A0 A recipe for = that is here: http://zookeeper.apache.org/doc/trunk/recipes.html#sc_leaderElection Question I wanted to ask is that is there any zookeeper recipe or framework > which gives us this functionality? I wanted to use something existing whi= ch > is will proven/tested before choosing to write from scratch. > Thanks,Vikrant > ------=_Part_16772_2103671938.1429016851700--