Try
↑ ↓ move↵ openesc close

Curriculum · Module 03, Queues and Streams

Lesson 3 · 7 topics · 40 min · Intermediate · 0/7 done

Partitioned logs

Keyed messages, partitions, offsets and consumer groups: how a log keeps order per key while many consumers share the load.

What each topic covers

  • A single queue with one reader hits a ceiling, and many readers on one queue lose the order. Partitions keep order per key and still share the load.
  • How a key becomes a partition, what an offset is, how a group shares partitions, and why a log can be replayed.
  • Read a keyed topic with a consumer group, then add idle consumers, a hot key, a rebalance and a replay.
  • Idle consumers, a hot key, rebalance pauses, no order across keys, a changed partition count, and retention eating unread data.
  • A sizing calculation from throughput and consumer speed, and the costs that stop you from simply picking a huge number.
  • Auto-commit, commit-before and commit-after processing give three different failure modes. The cost of committing more often, and how long a restart takes to catch up.
  • Three quick checks on partitions versus consumers, the ordering guarantee and a crash after uncommitted work, plus the sources.

Topics

  1. 1One line is not enough4 min
  2. 2Partitions, offsets and consumer groups6 min
  3. 3Four partitions, one hot key, one rebalance7 min
  4. 4When one partition cannot keep up6 min
  5. 5How many partitions to create7 min
  6. 6Where the commit goes decides the guarantee7 min
  7. 7Owners, order and commits: three checks3 min

Practise this lesson

14 interview questions on partitioned logs, with worked answers and sources.

Practise these

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