Each broker is assigned an ID. When there are multiple brokers in a cluster (best practice), one is selected as the
Controller. The Controller will be responsible for electing the leader of the partition.
|View Nodes in Zookeeper Shell|
Replicas provide guarantees for the availability of the data. The replicator
factor provides a way for the Kafka administrator to control the availability of that data in the event of failure. For example, if the replication factor is set to 3, you will have 3 copies of each partition spread across the brokers.
What are the goals for placement of replicas?
Producer or consumer sends request to the Broker and the Broker handles the request in the following way:
Within a broker, a topic can be broken down into multiple partitions (with n-1 partitions being replicas).