Queues & Async Processing
Take the slow work out of the request, promise to do it soon, and smooth every spike.
5 lessons · ~50 min · free
By the end you can
- Move slow work off the request path with a queue and workers
- Explain at-least-once delivery, acks, retries, and dead-letter queues
- Read queue depth as a signal and scale consumers to it
- Make handlers idempotent so duplicate delivery stops mattering
- Choose between a queue, pub/sub, and a log/stream on purpose
Lessons
- 1The slow thing in the fast path9 minA 3-second job inside a 200ms request, and the queue that takes it off the clock.
- 2The life of a message11 minAcks, visibility timeouts, retries, and the dead-letter queue where poison messages go.
- 3Queue depth is a gauge10 minBursty producers, steady consumers, and scaling workers off the number that matters.
- 4Delivered twice, applied once11 minWhy duplicates are normal, idempotency keys, and effectively-once as a system property.
- 5Queue, pub/sub, or stream9 minOne consumer, fanout, or replayable history: picking the shape, plus when async is wrong.
Design with it after
The design library has full system design prompts on a whiteboard canvas with AI feedback. Every one of them gives you a place to apply this.
Open the design library