bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
Learn/System Design/Building Blocks
System Design•Building Blocks

Queues & Async Work

A queue lets a request return immediately while slow, retryable work happens in the background. Workers must be idempotent and have bounded retries.

Key ideas

  • Move slow/retryable side effects (emails, transcoding, indexing) off the request path.
  • Workers must be idempotent — the same message may be delivered more than once.
  • Cap retries and route poison messages to a dead-letter queue; alert on queue depth.

Note

Queues protect request latency, but add eventual consistency and operational surface (DLQ, lag, ordering).

Previous

Databases & Indexing

Next

Consistency & CAP

This chapter

Overview
9

Lessons

18m

Read time

1. Load Balancing & Stateless Services2. Caching & CDNs3. Sharding & Replication4. Databases & Indexing5. Queues & Async Work6. Consistency & CAP7. Reliability & Failure Modes8. Observability & SLOs9. Back-of-the-Envelope Estimation