Node.js applications frequently need background work: sending emails and WhatsApp messages, generating PDFs, syncing with external APIs, processing uploads and running scheduled tasks. BullMQ is a popular choice because it is fast, TypeScript-friendly and uses Redis, which many stacks already run. Production reliability depends on Redis configuration and a few worker settings.
How BullMQ Works
API / app ─▶ Queue.add(job) ─▶ Redis ─▶ Worker processes (concurrency N)
▲ │
QueueEvents / dashboard ◀──┘ completed, failed, progress
Jobs live in Redis with states such as waiting, active, delayed, completed and failed. Workers pull jobs, run your processor function and report results. For general patterns, see our background workers guide.
Redis Configuration
- Set
maxmemory-policy noeviction. Eviction policies can delete queue keys and corrupt queue state; BullMQ documentation requires noeviction. - Enable AOF persistence so jobs survive Redis restarts.
- Size memory for peak queue length times job data size, and keep job payloads small (pass IDs, not documents).
- Keep Redis on a private network with a password or ACL user, and consider a dedicated Redis instance for queues separate from caching.
See our Redis guide for installation and security.
Workers and Concurrency
Run workers as separate processes from the web server so heavy jobs do not slow API responses. The concurrency option lets one worker process handle several jobs at once, which suits I/O-bound jobs such as API calls. Node.js runs JavaScript on a single thread, so CPU-heavy jobs need more processes (or sandboxed processors) rather than higher concurrency. Use separate queues and worker pools for different job types so slow jobs do not delay urgent ones.
Retries and Backoff
Set attempts and an exponential backoff on jobs that call unreliable services. Throw errors for transient failures to trigger retries, and mark permanent failures as unrecoverable so they are not retried pointlessly. Make processors idempotent, because retries and stalled-job recovery can run a job more than once.
Rate Limiting
BullMQ workers support rate limiters (for example a maximum number of jobs per time window) so you stay within external API and messaging provider limits. Combine rate limits with priorities so OTPs and password resets go first (see our notification service guide).
Scheduled and Repeating Jobs
Use delayed jobs for one-off future tasks and job schedulers (repeatable jobs) for cron-like schedules such as nightly reports. Define schedulers in one place at startup with stable IDs so deploys do not create duplicates, and make sure the server timezone or the scheduler's timezone setting is what you expect.
Flows
Flows let a parent job wait for child jobs, useful for workflows such as "process all pages, then assemble the PDF" or "resize every image, then publish the listing". Keep flows shallow and observable, and handle failures of individual children explicitly.
Cleaning Up Jobs
Completed and failed jobs stay in Redis unless removed. Use removeOnComplete and removeOnFail with an age or count limit, keeping enough failed jobs to debug. Without cleanup, Redis memory grows until it fails.
Stalled Jobs and Graceful Shutdown
If a worker dies mid-job, BullMQ detects the stalled job and moves it back to waiting (up to a limit). On deploys, call worker.close() on SIGTERM so the worker finishes active jobs before exiting, and give your process manager enough stop timeout. Avoid blocking the event loop with long synchronous code, which can make jobs look stalled.
Dashboards and Monitoring
Dashboards such as Bull Board or similar tools show queues, job states and failures, and let you retry jobs. Protect them with authentication and keep them internal. Export metrics for waiting jobs, active jobs, failure rate and processing time, and alert when queues keep growing or no worker is processing (see our monitoring guide).
Running in Production
- Run workers with PM2, systemd or Docker, with automatic restarts.
- Pass configuration through environment variables; never hard-code Redis credentials.
- Version job data formats so new code can handle jobs queued by old code.
- Log job IDs with every log line for traceability.
Sizing
| Workload | Suggested plan |
|---|---|
| Emails, webhooks, API sync for a typical app | 2 vCores / 8 GB (Redis plus workers) |
| PDFs, images, heavier processing | 4 vCores / 16 GB with several worker processes |
| High volume, many queues | Separate Redis server plus worker servers |
BullMQ, Celery or a Broker?
BullMQ is the natural choice for Node.js teams already using Redis. Python teams usually choose Celery (see our Celery guide). For cross-language messaging with complex routing, a broker such as RabbitMQ may fit better.
Example: A Booking Platform
A Node.js booking platform runs Redis with noeviction and AOF on a 4 vCore / 16 GB VPS alongside three worker processes. A notifications queue sends WhatsApp and email confirmations with a rate limiter, a documents queue renders invoices, and a scheduler runs reminder jobs every 15 minutes. Completed jobs are removed after a day, failed jobs are kept for a week, and workers close gracefully on deploy.
Common Mistakes
- Redis with an eviction policy, silently losing jobs.
- Large job payloads filling Redis memory.
- No cleanup of completed jobs.
- CPU-heavy jobs with high concurrency in one process.
- Killing workers mid-job on every deploy.
In Short
Configure Redis with noeviction and persistence, run workers as separate processes, tune concurrency to the job type, retry with backoff, rate-limit external calls, clean up jobs, shut down gracefully and monitor queues.
SkyRainCloud Plans for This Workload
BullMQ workers are usually I/O-bound and light; Redis needs memory for queued jobs. 2 vCores / 8 GB runs Redis plus workers for most apps; CPU-heavy jobs need more vCores and more worker processes.
AMD EPYC 7C13 VPS
Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — AMD | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Websites, small APIs, bots, staging and VPN servers | Order |
| VPS 2 — AMD | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,299/month | WooCommerce, Node.js/Python backends, Docker Compose stacks, CI runners | Order |
| VPS 3 — AMD | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,499/month | Production databases, high-traffic sites, multi-container apps | Order |
| VPS 4 — AMD | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,899/month | Large production workloads, SaaS platforms, analytics, in-memory caches | Order |
Intel Xeon Platinum 8269CY VPS
KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — Intel | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Business websites, small apps, scheduled jobs and bots | Order |
| VPS 2 — Intel | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,169/month | Business software, mid-size databases, several sites on one server | Check stock |
| VPS 3 — Intel | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,249/month | ERP/CRM stacks, heavier databases, multiple production apps | Check stock |
| VPS 4 — Intel | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,299/month | High-memory workloads and consolidated production servers | Check stock |
Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.