You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Vikrant Singh <vi...@yahoo-inc.com.INVALID> on 2015/04/14 01:36:56 UTC
Managing Watchers
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 triggered 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.
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 which is will proven/tested before choosing to write from scratch.
Thanks,Vikrant
Re: Managing Watchers
Posted by Cameron McKenzie <mc...@gmail.com>.
hey Vikrant,
If you just need primary / standby failover then a standard leader election
should work. Have a look at the Curator recipe.
http://curator.apache.org/curator-recipes/leader-latch.html
cheers
On Tue, Apr 14, 2015 at 9:36 AM, 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 triggered
> 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.
> 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 which is will proven/tested before choosing to write from scratch.
> Thanks,Vikrant
>
Re: Managing Watchers
Posted by Vikrant Singh <vi...@yahoo-inc.com.INVALID>.
Thank you all for feedback. I think I understand your advise and will use leader election to solve this problem.ThanksVikrant
On Monday, 13 April 2015 4:55 PM, John Sirois <jo...@gmail.com> wrote:
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 triggered
> 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". 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 which
> is will proven/tested before choosing to write from scratch.
> Thanks,Vikrant
>
Re: Managing Watchers
Posted by John Sirois <jo...@gmail.com>.
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 triggered
> 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". 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 which
> is will proven/tested before choosing to write from scratch.
> Thanks,Vikrant
>