Danielle M.
Danielle M.

Reputation: 3662

Zookeeper - monitoring leader when leaderServes=no

I recently scaled out a zookeeper cluster, and as part of the configuration change, we set

leaderServes=no

in order to increase throughput. This has worked out great, except for one problem: the leader no longer responds to (most) four letter words, replying to any inquiries with the message

This ZooKeeper instance is not currently serving requests

I get it dear leader, you're not doing the menial work anymore, but ... could the monitoring software still get your status and metrics?

I really hope there's a work around that isn't "use JMX". Any help much appreciated!

Upvotes: 6

Views: 1246

Answers (1)

shaoyihe
shaoyihe

Reputation: 1087

No , it cann't . This is what leaderServes=no functions , the leader refuses all the client commands .

//org.apache.zookeeper.server.quorum.Leader#lead
if (!System.getProperty("zookeeper.leaderServes", "yes").equals("no")) {
   self.cnxnFactory.setZooKeeperServer(zk);
 }

Upvotes: 1

Related Questions