Skip to content
Ameen Abozaid
Planned lessonSRB-006-L02

Partition strategy

  • Lesson 2 of 8
  • Senior B
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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.