When we say a topic is created with a Replication factors = 3. Does this mean each partition will have total of 3 replicas - out of which 1 will be leader and 2 will be replicas?
Or does this mean that there will be 3 replicas on top of 1 leader replica and therefore totally 4 replicas?
1 Answer 1
The replication factor of 3 includes the leader itself and 2 followers. Think of that factor in a more mathematical way: 1 times 3 still results in 3.
Let me give an example. A topic created with 3 partitions, replication factor of 3 results in 9 replicas. Three of those nine are leaders, the other six will be followers.
Unfortunately I didn't find something about that in the official documentation of Apache Kafka. But you can find some more details here https://www.javatpoint.com/kafka-topic-replication