Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # user >> Zookeeper Leader Election Preference


+
Raj N 2012-07-03, 19:16
Copy link to this message
-
Re: Zookeeper Leader Election Preference
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.

C

On Tue, Jul 3, 2012 at 3:16 PM, Raj N <[EMAIL PROTECTED]> 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
>
+
Raj N 2012-07-03, 19:48
+
John Sirois 2012-07-03, 19:27
+
Raj N 2012-07-03, 19:48
+
Flavio Junqueira 2012-07-03, 20:39
+
Bill Bridge 2012-07-03, 21:36