Architectureminimal
Queue and Background Workers
An API that pushes jobs to a queue, with background workers that process them and write results to object storage.
Start from this template
Opens in the editor. No signup. Export SVG, PNG, or an embed link.
Source text
title: Queue and Background Workers
theme: minimal
node api "API" [service]
node queue "Job queue" [queue]
node worker "Worker" [function]
node store "Object storage" [storage]
queue right-of api
worker right-of queue
store below worker
api -> queue : "enqueue" flow
queue -> worker : "pull"
worker -> store : "write result"About this template
The API puts jobs on a queue instead of doing slow work during the request. A worker pulls jobs from the queue and writes results to object storage.
This is the standard way to keep response times short for things like image processing, report generation, or sending email. The diagram makes it clear that the API and the worker scale separately.
To show more workers, add "node worker2 "Worker" [function]" with "worker2 below worker" and a "queue -> worker2" arrow. To show retries, add a dead-letter queue next to the main queue.