Pub/Sub: One Event, Many Listeners
A queue hands each note to exactly one worker. Sometimes you need the opposite: one thing happens and many services all need to hear it. That is pub/sub. Here is fan-out, how it differs from a queue, the queue-per-subscriber pattern that makes it durable, and how a notification system is built on it.
A from-the-ground-up look at pub/sub. Fan-out: a publisher posts one event to a topic and every subscriber gets its own copy, decoupled from the publisher. Why that is the opposite of a work queue (distribute vs broadcast), the queue-per-subscriber pattern (SNS to SQS) that gives each subscriber isolation and its own retries, and how a notification system fans an event out to email, SMS, and push. Everyday analogies, a hand-drawn diagram, a visualizer per idea, and what Amazon SNS, Google Cloud Pub/Sub, and Redis pub/sub really do.
- System Design
