Recall & Review
beginner
What is a partition in Kafka?
A partition is a division of a Kafka topic that stores a subset of the messages. It allows Kafka to scale and distribute data across multiple brokers.
Click to reveal answer
beginner
Why is the number of partitions important in Kafka?
The number of partitions affects parallelism, throughput, and fault tolerance. More partitions allow more consumers to read in parallel but can increase complexity.
Click to reveal answer
intermediate
What happens if you increase the partition count after topic creation?
You can increase partitions, but existing data stays in old partitions. New partitions start empty. This can affect message ordering and consumer logic.
Click to reveal answer
beginner
How does Kafka assign messages to partitions by default?
Kafka uses a partitioner that assigns messages based on the message key's hash. If no key is provided, it uses round-robin to distribute messages evenly.
Click to reveal answer
intermediate
What is a good strategy to decide the number of partitions?
Consider expected throughput, number of consumers, and hardware limits. Start with enough partitions to allow parallelism but not too many to avoid overhead.
Click to reveal answer
What does increasing the number of partitions in a Kafka topic do?
✗ Incorrect
More partitions allow more consumers to read messages in parallel, increasing throughput.
If a Kafka message has no key, how is its partition chosen?
✗ Incorrect
Kafka uses round-robin to evenly distribute messages without keys across partitions.
Can you decrease the number of partitions in a Kafka topic after creation?
✗ Incorrect
Kafka does not allow decreasing the number of partitions once a topic is created.
What is a risk of having too many partitions in Kafka?
✗ Incorrect
Too many partitions increase overhead for brokers and consumers, making management harder.
Which factor is NOT important when deciding partition count?
✗ Incorrect
The color of server hardware does not affect partition count decisions.
Explain how Kafka uses partitions to improve message processing.
Think about how dividing data helps multiple consumers work at the same time.
You got /4 concepts.
Describe the considerations when choosing the number of partitions for a Kafka topic.
Balance performance needs with system complexity.
You got /4 concepts.