Kafka medium
You have a single Topic with 4 partitions. If you launch 6 identical consumers in the same Consumer Group, what is the resulting state of the cluster?
- A Kafka dynamically splits the 4 partitions into 6 smaller 'sub-shards' to utilize all consumers.
- B 4 consumers will each be assigned 1 partition, while the remaining 2 consumers will remain completely idle (standby).
- C The cluster will enter a 'Livelock' state where partitions are constantly stolen between members.
- D All 6 consumers will read all 4 partitions, leading to massive data duplication.
Answer: B. 4 consumers will each be assigned 1 partition, while the remaining 2 consumers will remain completely idle (standby).
One partition cannot be processed by more than one consumer in a single group (to ensure message order). Thus, the number of partitions is the upper limit for effective horizontal scaling within a consumer group. To use 6 consumers, you must increase the partition count to at least 6.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- When implementing 'Exactly-Once Semantics' (EOS) in a Kafka stream, what is the role of the `isolation.level=read_committed` setting on the Consumer?
- Historically, which external service was required by Kafka to manage cluster hierarchy, metadata, and leader election status?
- Once a message is successfully appended to a Kafka partition log, what is its mutability status?
- In a Kafka cluster, what is the role of a 'Broker'?
- What is the primary indicator of a bottleneck in a Kafka consumer's processing logic?
- What is the primary architectural role of Apache Kafka in a distributed system?