If a background task matters after the HTTP request ends—or after a Node.js process restarts—don’t leave it in a detached promise, timer, or in-memory list. Put it in a persistent queue that stores job state outside the producer process, then let a worker claim and process it. That reduces the chance that a deploy or crash simply erases the work, but it is not an absolute guarantee: enqueue acknowledgement, backend durability, retries, shutdown, retention, and duplicate side effects all need deliberate handling.
Why work disappears in a Node.js service
A detached promise or process-local timer belongs to the lifetime of the process that created it. If that process exits before the task finishes, its in-memory state goes with it. This is the architectural risk behind questions such as “Why did my background job disappear after a deploy?”
A persistent queue changes that boundary: the application records a job in an external backend, and a worker claims it independently. The pg-boss introduction describes this producer-to-worker model for tasks such as sending email, rendering PDFs, calling slow third-party APIs, and handling order-related work. Those tasks are better candidates for a queue when they must outlive the request or be retried after a temporary failure.
A queue does not eliminate every loss scenario. The application must know whether the enqueue succeeded, and the backend must be configured to retain committed state as required. Workers also need recovery and retry policies, and the application must account for work that runs more than once.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- Dell PowerEdge R730xd 24B SFF 2U Server
- 2x Intel Xeon E5-2690 v4 2.6Ghz 14-Core (28-cores Total)
- 128GB DDR4 RAM – 4x 1.2TB 10K SAS 2.5” 12Gb/s
- Dell H730P mini 2GB 12Gb/s RAID
- 2x 750W PSU - 2x 10Gb SFP+ 2x 1Gb (RJ45) NIC
What a persistent queue does—and does not—guarantee
It separates request handling from execution
The request handler can submit work and return an appropriate response while a worker handles the slower operation. This keeps the task from depending on the request process remaining alive. But do not return success to the user before enqueueing has met the persistence requirement your application has chosen. BullMQ’s production guidance distinguishes producer behavior during a Redis outage from worker reconnection behavior; treat the producer’s acknowledgement as part of the request’s correctness.
It supports recovery, not exactly-once side effects
pg-boss documents at-least-once delivery: a job may be delivered again after a crash or expiration. That means a worker can perform an external side effect—such as sending a request to another service—then fail before recording completion. A retry may repeat the side effect. Make handlers repeat-safe with an idempotency key, a unique database constraint, or an application state transition that prevents the same business action from being applied twice.
Rank #2
- Model: Dell OptiPlex 7050 Small Form Factor (SFF)
- Processor: Intel Core i7-7700 3.60 GHz
- Memory: 32GB DDR4 Ram
- Storage: 1TB Solid State Drive (SSD) Fast Boot + Storage
- Operating System: Windows 11 Pro (64-bit)
Retries require policy
BullMQ does not make every failing job retry automatically by default. Its retry guide says to set attempts greater than one to enable automatic retries, and documents fixed and exponential backoff, with optional jitter. Use a delay suited to the dependency and failure: fixed intervals are predictable, while exponential backoff spaces repeated attempts and jitter can reduce synchronized retry bursts. Do not endlessly retry errors that are permanent, such as invalid input.
Where queued jobs can still stall or fail
Worker crashes and lock expiry
BullMQ tracks an active job with a renewable lock. If a worker cannot renew that lock, the job may be marked stalled and returned to waiting; repeated stalls can exceed the configured threshold and fail the job. See the stalled jobs guide for the lock and recovery behavior.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #3
- 2.80 GHz processor speed ensures efficient operation with consistent reliability
- Intel Xeon 2.80 GHz processor provides enterprise-grade performance with built-in security and remote management capabilities
- Quad-core (4 Core) processor core helps server process data quickly and reliably for maximum productivity
- 1 processors supported for faster processing and improved access to data, optimizing performance under heavy loads
- With 16 GB memory, you can multitask between applications seamlessly, keeping productivity high and response times quick
CPU-heavy work blocks the event loop
A busy Node.js event loop can prevent a worker from renewing its lock on time, even if the process is still running. BullMQ recommends keeping CPU-intensive work from blocking queue maintenance. Move such processing to a sandboxed processor or separate process, or break it into smaller units that let the worker continue renewing its lock.
Deploys and forced termination
Close workers on SIGINT and SIGTERM so they can stop accepting work and finish or release active jobs cleanly. BullMQ cautions that forced termination can leave jobs marked stalled until a worker returns, and a job that runs longer than the deployment’s shutdown grace period may still stall. Set the platform grace period with expected job duration in mind; graceful shutdown reduces avoidable interruptions but cannot guarantee that every in-flight job finishes.
Rank #4
- MODEL P74439-005: Compact and affordable HPE ProLiant MicroServer Gen11 powered by Intel Pentium Gold G7400 3.7GHz processor, ideal for file sharing, NAS, and basic business workloads
- READY OUT OF THE BOX: Includes 16GB DDR5 UDIMM memory (expandable to 128GB), one 1TB SATA 6G Business Critical HDD, embedded Intel VROC SATA, dedicated iLO-M.2 port kit, 180w external power adapter and 1/1/1 warranty for dependable plug-and-play server operation
- WHISPER-QUIET & SPACE-SAVING: Ultra-compact mini tower design fits easily in small office spaces; supports wall, flat, or vertical placement for deployment flexibility
- INTEGRATED REMOTE MANAGEMENT: Comes with HPE iLO 6 and embedded TPM 2.0 for secure, license-free remote server administration through shared port access
- EXPANDABLE DESIGN: Two PCIe slots (including PCIe 5.0) and four LFF-NHP drive bays provide robust options for storage and component scalability. Features new MR408i-p controller support for enhanced storage performance
Retention and sensitive payloads
BullMQ’s production guide says completed and failed jobs are retained by default unless automatic removal is configured, so choose retention based on how long you need job history and how much backend storage you can allocate. The same guide says job data is stored in clear text. Keep payloads minimal and do not put secrets or sensitive data in them unless you have an appropriate encryption arrangement.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Choose a backend that fits your data and operations
If your team already operates PostgreSQL, the documented choices here include pg-boss and BullMQ’s optional PostgreSQL backend. Redis is BullMQ’s default backend and is described by BullMQ as the more battle-tested option on its backend page. The right choice depends less on a universal “best” queue than on whether a separate datastore, transaction boundaries, connection capacity, expected throughput, and operational familiarity fit your system.
Best Value
- HP Z4 G4 Workstation Tower
- Intel Xeon W-2133 6-Core 3.6GHz (3.9GHz Turbo)
- 64GB DDR4 Memory - Nvidia Quadro P400 2GB
- 512GB NVMe M.2 SSD (boot) + 2TB HDD (storage)
- Windows 11 Pro 64-bit
| Decision axis | BullMQ with Redis | PostgreSQL-backed option |
|---|---|---|
| Operational footprint | Uses Redis as BullMQ’s default backend; account for it as a separate service if you do not already operate it. | pg-boss uses PostgreSQL. BullMQ also offers an optional PostgreSQL backend for teams that prefer not to operate separate Redis or want queue jobs alongside relational data. BullMQ’s PostgreSQL guide and the pg-boss introduction describe these options. |
| Transactional enqueue | The reviewed BullMQ documentation does not establish a transaction spanning Redis queue insertion and application SQL writes. If both happen separately, account for the dual-write failure window. | pg-boss documents adding a job in the same transaction as the associated database change: the job exists if and only if that transaction commits. BullMQ’s PostgreSQL backend page does not establish the same transaction guarantee for every application workflow. |
| Delivery and recovery | BullMQ documents retries and stalled-job recovery; configure attempts and backoff and understand lock renewal. | pg-boss documents at-least-once delivery and job claims using SKIP LOCKED; handlers must tolerate repeat execution. |
| Published throughput figures | In BullMQ’s own same-machine benchmark, the documentation reports about 7,500 sequential adds per second, 38,000 concurrent individual adds per second, 52,000 batched concurrent adds per second, and 6,000 processing jobs per second at concurrency 1. | In that same BullMQ documentation benchmark, PostgreSQL reports about 7,000 sequential adds per second, 15,000 concurrent individual adds per second, 45,000 batched concurrent adds per second, and 2,300 processing jobs per second at concurrency 1. |
| Capacity and durability considerations | BullMQ says Redis persistence must be configured manually; its production guide also recommends production error handling and graceful shutdown. | BullMQ states PostgreSQL 13 is the minimum and PostgreSQL 14 or later is recommended. Pool size and server max_connections need to account for queues, workers, and event connections. BullMQ warns that synchronous_commit = off or local can lose recent commits after a crash. |
The throughput figures are BullMQ’s documentation benchmark, with no publication year stated in the page excerpt and not enough representative hardware or deployment detail to generalize them. Treat them as contextual vendor figures, not a performance promise for your workload. See the backend guide for its benchmark and configuration details.
When PostgreSQL is the more natural fit
If a database change and its job must commit together, pg-boss’s documented transaction support can close the gap between “the order was saved” and “the order task was queued.” Another common architecture is an outbox table written in the application transaction and relayed to a queue; that is a design pattern, not a guarantee supplied by the queue itself, so the relay’s retry and recovery behavior must also be validated.
When Redis is the more natural fit
If Redis is already part of your infrastructure and BullMQ’s default backend fits your operations, adding a PostgreSQL queue backend solely to avoid Redis may not simplify the system. Consider actual queue volume, connection limits, durability settings, and how your team diagnoses backend incidents rather than choosing from a benchmark figure alone.
Quick Recap
Implementation checklist for a safer queue
- Separate producer and worker roles. Enqueue from the request path, and do slow or retryable work in workers rather than relying on a request to stay open.
- Make enqueue acknowledgement meaningful. Decide what persistence level must be reached before the API returns success, and handle backend errors visibly.
- Configure retries deliberately. For BullMQ, set
attemptsabove one when retries are wanted, choose fixed or exponential backoff, and avoid retrying permanent failures forever. - Make job handlers idempotent. Use an idempotency key, unique constraint, or state transition so a crash-and-retry does not duplicate the business effect.
- Keep workers responsive. Isolate CPU-intensive work or split it into smaller tasks so lock renewal and queue maintenance continue.
- Shut down gracefully. On
SIGINTorSIGTERM, close workers and allow the deployment grace period to cover expected in-flight work. - Surface infrastructure failures. Attach error handlers and logs to queue and worker connections as BullMQ’s production guidance recommends.
- Watch queue health. Monitor waiting, active, and failed counts; oldest waiting-job age; stalled events; retry volume; worker availability; backend errors; and storage growth. Instrument the precise signals exposed by your chosen library and backend.
- Control retention and payload contents. Set history retention intentionally and keep queue data minimal, particularly if it could contain sensitive information.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →




