Skip to content

Queues and events

Module 10 of the System Design Masterclass. Every lesson here is free to read, with no account.

  • 8 lessons
  • 2 h 50 min of reading
  1. 58Queues: what they solve, and what must stay in the requestHow a queue moves slow work out of the user's request, how to choose what moves and what stays, and how to do the arithmetic for a growing backlog.23 minCore Fast track
  2. 59Queue, log or pub/sub (RabbitMQ-style vs Kafka-style)The difference between a queue that removes messages and a log that keeps them, with partitions, offsets and consumer groups, event-driven design, and how to choose.24 minCore
  3. 60Will my message arrive once, twice or never?Why a message can be lost or repeated, what at-most-once, at-least-once and exactly-once mean, and how the order of the acknowledgement and the work decides which one you get.20 minCore
  4. 61Doing it twice should be safe (idempotency)How to make a request or a message safe to receive twice: idempotency keys, a table of seen IDs with a unique constraint, and consumers that skip repeats.24 minCore Fast track
  5. 62Dead-letter queues and poison messagesWhat to do with a message that fails every time: limit the tries, move it to a separate queue, raise an alarm, fix the cause and send it again.12 minCore
  6. 63When too much arrives: slow down, say no, or do lessWhat to do when more work arrives than a service can finish: bounded queues and back-pressure, load shedding by priority, and graceful degradation, with the numbers.20 minCore
  7. 64Save and announce together (outbox, CDC)Why saving to a database and sending a message are two separate writes that can disagree, and how an outbox table or change data capture makes them agree.24 minCore
  8. 65Separate reads from writes; store events (CQRS, event sourcing)How to give reads their own copy of the data, shaped for each screen and filled from events, and how to store every change as an event instead of the current state: when each one pays and when it is too much.23 minSenior

The AI tutor is the part you sign up for

Reading is free for everyone. A free account adds the tutor, quizzes, notes and your progress.