System Design
9. Message Queues and Event-Driven SystemsAnimated
Redis Streams
An append-only log inside Redis.
The idea
Streams give consumer groups and acknowledgements with Redis simplicity.
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
- 1XADD appends
- 2Consumer groups read
- 3XACK confirms
- 4Pending entries can be claimed
Where it is used
Lightweight streaming.
Watch out for
Limited by memory unless trimmed.