What are the three main responsibility planes in Kafka?
What does the controller do in Kafka?
The controller manages cluster metadata and control-plane decisions such as topic and partition metadata, broker membership changes, and partition leader elections. It is not in the normal produce/fetch data path.
What does a partition leader do?
A partition leader is the authoritative broker for one partition. Producers write to it, consumers fetch from it, and followers replicate from it.
What does a partition follower do?
A follower is a non-leader replica that actively fetches data from the leader to stay caught up and can become leader if elected.
Is Kafka replication push-based or pull-based?
Pull-based. Followers send fetch requests to the leader and copy data from it.
What is ISR in Kafka?
ISR stands for In-Sync Replicas. It is the set of replicas sufficiently caught up with the leader and eligible for safe leader election.
Is every follower automatically in the ISR?
No. A follower is any non-leader replica. It is only in the ISR if it is sufficiently caught up.
Does replication factor include the leader?
Yes. Replication factor is the total number of replicas for a partition, including the leader. RF=3 means 1 leader and 2 followers.
What is the difference between replication factor and ISR size?
Replication factor is the configured total number of replicas. ISR size is the number of replicas currently in sync. RF is static; ISR is dynamic.
What does acks=all mean?
The leader waits for all replicas currently in the ISR to acknowledge the write, not all assigned replicas in the replication factor.
What does min.insync.replicas do?
It defines the minimum ISR size required for a write with acks=all to succeed. If ISR is below that threshold, the write fails.
Why is acks=all often misunderstood?
Because many think it means all assigned replicas. In reality, it means all replicas currently in the ISR.
What does the group coordinator do?
The group coordinator manages consumer-group state: membership, joins, heartbeats, rebalances, and offset commits.
Where are consumer offsets stored?
In the internal compacted Kafka topic \_\_consumer_offsets.
Who handles an offset commit?
The consumer sends the offset commit to the group coordinator, which persists it in \_\_consumer_offsets.
Why are offset commits handled by the group coordinator and not the partition leader?
Because committed offsets are consumer-group progress state, not part of the business topic’s data stream.
Can a broker have multiple roles at the same time?
Yes. A broker can be leader for some partitions, follower for others, coordinator for some consumer groups, and in combined KRaft mode also have the controller role.
Are Kafka roles global or scoped?
Scoped. A broker is leader for specific partitions, coordinator for specific groups, and controller only if configured and currently active in the controller quorum.
What is the difference between controller and partition leader?
The controller manages cluster metadata and leader elections. The partition leader handles actual reads, writes, and replication for one partition.
What is the difference between controller and group coordinator?
The controller manages cluster-level metadata and leadership. The group coordinator manages consumer-group membership, rebalances, and offset commits.
What is the difference between partition leader and group coordinator?
A partition leader serves actual topic data for one partition. A group coordinator manages group control functions such as join, heartbeat, rebalance, and commit.
How does a producer find where to send records?
It first gets cluster metadata from a broker, learns which broker is leader for the target partition, then sends the record to that partition leader.
Does a producer send records to the controller?
No. A producer sends records to the leader of the target partition.
How does a consumer get actual records?
It fetches records from the leader of its assigned partitions.