System Design
Intermediate
Queues, Streams, and Event-Driven Design
Design asynchronous workflows that survive retries, partial outages, and high fanout.
35 min
3 sections
queues
events
kafka
1
2
3
01. Use async boundaries for resilience
Section 1 of 3
Queues decouple user-facing latency from slow work like email, indexing, fraud scoring, image processing, billing exports, and partner webhooks. The tradeoff is eventual consistency and more operational complexity.
text
Order placement flow:
API receives order
-> transaction writes order + outbox event
-> response returns order_id
Outbox relay publishes OrderPlaced
-> payment worker authorizes payment
-> inventory worker decrements stock
-> email worker sends confirmation
-> analytics worker updates metricsBack to Course