What is the role of replication in Kafka?

Replication in Kafka is the process of maintaining multiple copies of each partition across different brokers so that data remains available and durable even if a broker fails.

Key Points

Example

A topic with replication factor 3 stores three copies of every partition across three different brokers, so the cluster can survive up to two broker failures without losing that topic's data.

# server.properties
default.replication.factor=3
min.insync.replicas=2
unclean.leader.election.enable=false

# Internal topics need replication too, or the cluster has a single point of failure
offsets.topic.replication.factor=3
transaction.state.log.replication.factor=3
transaction.state.log.min.isr=2

# Spread replicas across racks or availability zones
broker.rack=ap-south-1a

Interview Tip

A concise interview answer is

Replication keeps multiple copies of each partition on different brokers so a broker failure doesn't mean data loss or downtime — Kafka just promotes one of the in-sync replicas to leader — and the replication factor is the main knob for balancing durability against storage cost.

Last updated: 1 November 2026

Previous question: How does Kafka achieve fault tolerance?

Next question: How does Kafka ensure data is not lost?

More Kafka (Optional) interview questions

All Kafka (Optional) questions