System Design
9. Message Queues and Event-Driven SystemsAnimated
Amazon SQS
A managed message queue.
The idea
SQS provides standard and FIFO queues with visibility timeouts and no servers to run.
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
- 1Producer sends
- 2SQS stores
- 3Consumer receives and message becomes invisible
- 4Consumer deletes it on success
Where it is used
Cloud task queues.
Watch out for
Standard queues can deliver duplicates and out of order.