Election Leader in Zoo and Kafka

The question bothered me for a long time. I know that leader elections exist in the zoo. Suppose we have a Kafka cluster associated with the Zookeeper ensemble.

So my understanding is that there is a zookeeper leader in Ensemble, as well as some “partition leaders” in the Kafka cluster. And the Kafka section leader is selected through the Zookeeper API. Correctly?

Another question: is the master / subordinate basically the same as the leader / follower?

+4
source share
2 answers

Kafka does not select a partition leader using the zookeeper API; in fact, the first replica in a live replica destination will be selected by the leader for each partition.

As for the main / subordinate things, as I know, many open sources have already replaced the old "master / slave" terminology with leader / replica or primary / replica, so basically they are the same.

+2
source
  • The Zookeeper leader election has nothing to do with the Kafka leader election, vice versa.
  • Kafka, , - , Zookeeper path/Controller/2,2 - broker.id. , ( ) , ISR, . ( ), . unclean.leader.election.enable=true, , , ISR . .
  • master/slave , /.
+2

Source: https://habr.com/ru/post/1664934/


All Articles