Skip to content

7. Kafka Replication

MohanprasadKumar ST edited this page May 17, 2021 · 1 revision

Replication

  • Each partition is replicated across multiple server for fault tolerance
  • Only one partition will be active at a time called LEADER
  • Other partition are called FOLLOWER
  • Leader handles all read and write request for partition, while followers passively replicate from the leader

Scenario

  • KAFKA CLUSTER - 3Broker 1Topic 1Partition 1Replicatoin
    1. P0 will be present in any one of the 3Brokers and it is called Leader, other 2Brokers will not have any PARTITIONS.
  • KAFKA CLUSTER - 3Broker 1Topic 1Partition 2Replicatoin
    1. P0 will be present in any one of the 3Brokers and called as LEADER; 1FOLLOWER will be in any one of other 2Broker; 1Broker will not have any PARTITIONS
  • KAFKA CLUSTER - 3Broker 1Topic 1Partition 3Replicatoin
    1. P0 will be present in any one of the 3Brokers and called as LEADER; 2FOLLOWER will be in other 2Broker;