System Design
3. Client-Server Architecture9. Message Queues and Event-Driven SystemsAnimated
Event-Driven Architecture
Components react to events instead of calling each other directly.
The idea
Producers publish events to a broker; consumers subscribe and react independently, decoupling teams and timing.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- client
- gateway / proxy
- service
- cache
- data store
- queue / stream
A service publishes an event: "OrderPlaced".
- step:
- 1/4
- at:
- Producer
1/8
The green dot is a request moving through the system.
Step by step
- 1A service emits an event
- 2The broker stores and routes it
- 3Interested services consume it
- 4Each does its own work
Where it is used
Order flows, notifications, analytics.
Watch out for
Hard to trace end-to-end and events may arrive late or twice.