Try
↑ ↓ move↵ openesc close

Interview prep / Partitioned logs

Mid · Partitioned logs · System design interview question

Explain consumer groups. What happens when there are more consumers than partitions?

Sketch your own answer first, then compare it with the one below.

A strong answer

A consumer group is a set of consumers that share a topic. The group assigns each partition to exactly one member, so partitions are read in order and no message goes to two members of the group. Different groups each get their own full copy of the stream.

If the group has more members than partitions, the extra members own nothing and sit idle. Adding consumers beyond the partition count does not increase throughput.

That is why the partition count deserves capacity planning. Leave room to grow, because raising it later is disruptive.

Sources

Learn it by running it

The partitioned logs lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms