roadmaps / redis-queue-workers
8 steps · ~40 min · intermediate · free · ships with the app
Workers & the Redis job queue
Nimbus Books is thriving — and checkout now freezes for two full seconds while each receipt is generated. Meet the pattern behind every busy backend: accept fast, work later. Push orders onto a real Redis queue, hire a worker to consume it, watch a flash sale pile up a backlog, scale the workers into a self-healing fleet — and dead-letter the one corrupted order that would have jammed the line.
before you start
- Docker installed and running
- A Torollo project created and open on the canvas (start from an empty one)
- Comfortable running basic commands in a Linux terminal
- Having played "Deploy a resilient three-tier app" or "Cache-aside with Redis" helps, but this story stands on its own
The 8 steps and what each one checks
Every step ends with a validation pass that inspects your actual containers. The lines below are the exact observations it makes. The instructions, hints and commented walkthroughs live in the app.
step 1 of 8
Reopen the store
- check: container "web" is running
step 2 of 8
The two-second checkout
- check: GET :80/ on "web" contains "Nimbus Books"
- check: GET :80/order on "web" contains "Thank you"
step 3 of 8
Enter the queue
- check: container "queue" is running
- check: web → queue is reachable on :6379
step 4 of 8
The producer
- check: GET :80/order on "web" contains "accepted"
- check: key "stats:orders" exists in "queue"
step 5 of 8
The first worker
- check: container "worker-1" is running
- check: worker-1 → queue is reachable on :6379
- check: key "stats:receipts" exists in "queue"
- check: GET :80/ on "web" contains "backlog: 0"
step 6 of 8
The receipt archive
- check: container "archive" is running
- check: worker-1 → archive is reachable on :5432
- check: table "receipts" exists in "archive"
- check: web → archive is blocked on :5432
step 7 of 8
The flash sale
- check: "worker-asg" keeps 3 replicas running
- check: container "worker-1" is running
- check: GET :80/ on "web" contains "backlog: 0"
step 8 of 8
The poison order
- check: key "queue:orders:dead" exists in "queue"
- check: GET :80/order on "web" contains "accepted"
Play it on your machine
This roadmap ships free with the app. The only requirement is a running Docker daemon.
$ npx torollo start
MIT licensed · source on GitHub