10 parts · 12 chapters

Jobs, Queues and Workflows

Most important backend work does not happen inside a request: receipts, reconciliation, payouts, statement generation, retries against flaky partners. Background work is where reliability is won or lost, because failures happen when nobody is watching.

Ten parts: background jobs and why they exist; delivery semantics and idempotent consumers; retries, backoff and dead letters; RabbitMQ and SQS; cron and scheduling at scale; sagas; durable execution with Temporal; the outbox and inbox patterns; observability for asynchronous work; and a capstone building a small workflow engine.

background jobs · delivery semantics · retries and dead letters · RabbitMQ and SQS · cron at scale · sagas · durable execution · outbox and inbox · observability · capstonemid → staff · backend engineers running asynchronous work
jobsEnqueue ids, idempotent handlers, priorities and concurrency limits.
semanticsAt-most-once, at-least-once, exactly-once in effect.
failureRetries with backoff and jitter, poison messages, dead letters.
brokersRabbitMQ exchanges and acks, SQS visibility timeouts and FIFO.
workflowsSagas, compensation, Temporal's durable execution.
reliabilityOutbox and inbox, observability, and the capstone engine.
Built on the Production Stack and KafkaProduction Stack part 5 introduced worker libraries per language; Kafka and Redis cover two common backends; Ledgers covers payout state machines.