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 <[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.