Queues Best Practices
Monitor queue depth; alert before consumers drown. Queues decouple HTTP from slow work only when ops discipline matches.
Search across all documentation pages
Monitor queue depth; alert before consumers drown. Queues decouple HTTP from slow work only when ops discipline matches.
email, billing, media).worker.close() with grace period > p99 job time.Sustained growth over 15 minutes is incident. Steady state near zero with spikes OK.
Many pods with moderate concurrency beats one monster pod for fault tolerance.
Rare. Return 503 and alert. Do not block HTTP 30s on Redis outage.
BullMQ if Redis exists. SQS for AWS-managed with less Redis ops.
Use separate queues for premium tier instead of starving bulk work.
SQS FIFO or single concurrency per MessageGroupId. BullMQ single consumer queue.
Mock vendor 503; assert attempts count and final DLQ placement.
Yes. Processors must be idempotent; Bull Board still recommended.
Queue depth silent growth until Redis OOM or SLA miss. Alert early.
Include schemaVersion in payload; workers handle N and N-1 during deploy.
Stack versions: This page was written for Node.js 24.18.0 (Active LTS), npm 10+, TypeScript 5.6+, Express 5, Fastify 5, and NestJS 11.
Reviewed by Chris St. John·Last updated Jul 16, 2026