Category: Background jobs
-
Rate-limited, delayed, and scheduled jobs in Node.js
A burst of sign-ups meets a provider quota, a reminder waits two seconds, and a check runs on a timer. BullMQ limiter, delays, and job schedulers.
-
Structured logs and correlation IDs for Node.js job queues
Every job step writes one JSON line, and one correlation ID finds them all, through retries, a crash, and replay. Node.js, BullMQ, and pino.
-
Failed jobs in Node.js: dead-letter handling with BullMQ
BullMQ has no built-in dead-letter queue. Stop retrying permanent errors, park failed jobs, alert on depth and age, and replay safely.
-
Jobs that survive a crash: Node.js and BullMQ
A queue in memory loses every waiting job when the process stops. See how BullMQ and Redis keep them, tested by killing the worker.
-
Jobs that run twice: idempotency keys in Node.js
A retry can run a side effect twice. A simulation of 1,000,000 sign-ups shows how idempotency keys stop duplicate emails, and where the key must go.
-
Ten steps at 99% is 90%: retrying multi-step jobs
A job with ten steps at 99% succeeds only 90% of the time. A simulation shows why retrying the whole job repeats work, and how to retry each step.
-
How to retry failed jobs in Node.js without making it worse
Add job queue retries in Node.js with exponential backoff and jitter, and stop early on errors that retrying cannot fix. Code and simulation included.
-
How many jobs should a Node.js queue run at once?
One job at a time is slow, and all at once gets you rate-limited. Add job queue concurrency in Node.js with a safe limit and a clean shutdown.
-
What is a job queue, and why does my API need one?
Build a job queue in 40 lines of TypeScript and see why sending email inside an API request makes sign-ups slower and less reliable.