zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Camille Fournier <cami...@apache.org>
Subject Re: Zookeeper Leader Election Preference
Date Tue, 03 Jul 2012 19:28:30 GMT
When I was doing a similar thing, we would start the 2 nodes in the primary
first (which will get a leader elected), then start the 3rd in the backup.
We also had a script set up to monitor the 3rd ZK and restart it if it
became leader. Hacky but it works.

The challenge is that some of the monitoring commands can timeout across
data centers because our monitoring network connection logic is broken, so
use the most lightweight monitor possible for this. stat is probably it.


On Tue, Jul 3, 2012 at 3:16 PM, Raj N <raj.cassandra@gmail.com> wrote:

> Hi experts,
>      I am trying to setup a Zookeeper ensemble of 3 nodes across 2 DCs. 2
> of the 3 will run in the primary. And 1 will run in the secondary DC. Is
> there a way to hint that the leader should be selected from the 2 nodes in
> the primary DC. I am trying to avoid the case where the node in the
> secondary DC is the leader since that means I will have to pay for the WAN
> latency for every write request.
> Thanks
> -Raj

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message