Partition strategy
On This Lesson 4 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
choose partition count and keys with growth and ordering in mind.
Planned topics
- Partitions are the unit of parallelism: a consumer group can have at most one active consumer per partition.
- The key decides ordering: events with the same key stay ordered in one partition.
- Changing partition count later breaks key-to-partition mapping; plan headroom.
- Beware hot keys; avoid keys that concentrate traffic.
Draft outline details
Demonstration
a sizing formula: partitions >= max(target throughput / per-partition throughput, target throughput / per-consumer throughput), with a growth factor; example for shipment events keyed by shipmentId.
Check your understanding
Why is changing partition count risky?
Show answer
Key-to-partition mapping changes and ordering per key can break.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.