Level 2 · Systems
Decoupling with queues and events
Service A calls service B directly. B goes down for ten minutes and A goes down with it. A queue between them turns an outage into a delay — and introduces a set of problems you now have to think about explicitly.
Chapters
- How queues buffer unpredictable spikesPlacing a queue between services converts immediate outages into manageable processing delays and protects downstream systems.
- How fanout pattern distributes messagesPublishing an event to a topic allows multiple downstream queues to receive the message independently, isolating failures and scaling systems.
- How EventBridge routes events by patternEventBridge decouples systems by routing JSON payloads based on their content, but unmatched events vanish silently unless you configure archives or dead-letter queues.