§ 02.05 — Jobs & Queues

Work that doesn't block.

Background processing, schedules and retries for everything that shouldn't make a request wait — workers, dead-letter queues and priority lanes.

job queue · workers: 3
live
IDJob typeAttemptStatus
j001email:welcome×1done
j002pdf:invoice×1running
j003webhook:stripe×2retry
j004image:resize×1running
j005report:monthly×1queued
j006notify:push×1queued
j007sync:crm×3retry
j008email:receipt×1done
§ Resilience — Retry & backoff

Every job gets its chance

Transient failures — a downstream API down, a DB timeout — trigger exponential backoff. Only permanently failed jobs reach the dead-letter queue, and every one fires an alert.

Attempt 1+0s · first try
Attempt 2+5s · retry · backoff 5s
Attempt 3+25s · retry · backoff 25s
DLQ+125s · dead-letter · alert
§ Capability — How we process background work

Nothing drops, nothing blocks

01

Reliable delivery

Jobs survive deploys, crashes and timeouts — persisted in the database, not lost in memory.

02

Retry & backoff

Exponential backoff with jitter, configurable max attempts, and a dead-letter queue for debugging.

03

Scheduled jobs

Cron-style schedules for reports, cleanups and billing cycles — with missed-job detection.

04

Concurrency control

Worker pools with rate limits and priority queues so one heavy job can't starve everything else.

Let's talk async

Move the heavy work off the request.