#BullMQ
bullmq 2.4.2 [updated]

A powerful, fast, and robust job queue for Elixir backed by Redis

Licenses: MIT
November 19, 2026 at 4:30 AM
sig 0.2.0 [updated]

A resilient DAG workflow engine for Elixir, backed by Ecto (PostgreSQL) and BullMQ (Redis).

Licenses: MIT
November 18, 2026 at 11:45 PM
Worker OOM killed mid-execution during an AI function call? BullMQ forces a full retry. Hatchet Engine resumes from the exact failed step. Full benchmark matrix inside: https://bijaktechnology.com/en/blog/arsitektur-stateful-ai-workflow-hatchet-docker-hostinger-vps/ #DevOps #KVM
November 17, 2026 at 9:30 AM
sig 0.1.0 [new]

A resilient DAG workflow engine for Elixir, backed by Ecto (PostgreSQL) and BullMQ (Redis).

Licenses: MIT
November 13, 2026 at 4:15 PM
bullmq 2.4.1 [updated]

A powerful, fast, and robust job queue for Elixir backed by Redis

Licenses: MIT
November 12, 2026 at 9:15 PM
Production war-story: API timeouts and OOM crashes under AI load? Your main thread is bottlenecked.

Full benchmark matrix inside: https://bijaktechnology.com/en/blog/optimasi-antrean-ai-bullmq-redis-arsitektur-asinkron-vps/ #DevOps #KVM
November 10, 2026 at 3:00 AM
Bluesky Thread Part 2: Transitioning to an asynchronous worker pool via BullMQ and Redis transforms system throughput from 15 to 1,250 req/sec. 2/3
November 9, 2026 at 10:30 PM
Bluesky Thread Part 3: Full benchmark table & KVM / enterprise blueprint here: https://bijaktechnology.com/en/blog/optimasi-antrean-ai-bullmq-redis-arsitektur-asinkron-vps/ #CloudEngineering #FinOps 3/3
November 9, 2026 at 10:30 PM
Bluesky Thread Part 1: Processing LLM prompts synchronously in your main thread guarantees CPU bottlenecks and HTTP 504 errors at scale. 1/3
November 9, 2026 at 10:30 PM
neweb.ai: Architecture of an Autonomous Website Manager
## Overview neweb.ai is a full-stack SaaS platform that automates WordPress website creation and blog content generation using multiple AI models. Users configure their business details, and the platform provisions a live WordPress site, generates SEO-optimized blog content on autopilot, tracks keyword rankings, and audits content performance — all through a real-time dashboard. **Stack:** Node.js/Express, MongoDB, PostgreSQL, Redis, BullMQ, React 19, Redux Toolkit, TanStack Query v5, Socket.IO, Stripe, Clerk Auth, Docker, Prometheus + Grafana **Live:** dashboard.neweb.ai | landing.neweb.ai ## Architecture ┌─────────────────┐ ┌──────────────────┐ ┌───────────────────┐ │ User Dashboard │ │ Admin Dashboard │ │ Landing Site │ │ (React + Vite) │ │ (React + Vite) │ │ (Next.js) │ └────────┬────────┘ └────────┬──────────┘ └───────────────────┘ │ │ └───────────┬───────────┘ │ REST + Socket.IO ┌──────┴──────┐ │ Backend │──── Clerk (Auth) │ (Express) │──── Stripe (Payments) └──────┬──────┘──── DataForSEO (Rankings) │ ── Azure OpenAI (Content Gen) ┌──────────┼──────────┐── Claude Haiku (Audits) │ │ │── Runware (Image Gen) ┌────┴───┐ ┌───┴───┐ ┌───┴────┐ │MongoDB │ │ Redis │ │ PgSQL │ └────────┘ └───┬───┘ └────────┘ │ ┌─────┴─────┐ │ BullMQ │ │ Workers │ └───────────┘ * **Monorepo** with 5 packages: backend, user dashboard, admin dashboard, landing site, WordPress themes * **Dual databases:** MongoDB (primary data), PostgreSQL (secondary/analytics) * **Redis** powers BullMQ job queues, Socket.IO adapter, and SEO data caching ## Core Features ### 1. WordPress Provisioning Pipeline (12-Step Orchestration) The standout engineering feat — a 12-step sequential pipeline that provisions a full WordPress site from scratch: 1. Create Subdomain (mybiz-f4d2-a7x9.newebai.com) 2. Install WordPress (admin creds held in-memory) 3. Install Theme (dynamically resolved by business type) 4. Install Plugins 5. Insert Business Details (via WP REST API) 6. Shortcode Modifications 7. Health Check (graceful if DNS hasn't propagated) 8. Add Page Templates 9. Import Global Styles 10. Load Environment Config 11. Core Setup 12. Editor Configuration **Key design decisions:** * **Full-sequence retry, not per-step** — if step 8 fails, the entire pipeline retries from step 1 after cleaning up the failed subdomain. This guarantees atomic consistency: you never get a half-built site. * Max 3 attempts with full cleanup between retries * Real-time progress via Socket.IO (`wp:build:progress` events streamed per step) * Credentials emailed as PDF after successful provisioning — avoids storing plaintext admin passwords in logs ### 2. AI Blog Generation & Autopilot **Multi-model LLM strategy:** * **Azure OpenAI (gpt-4o-mini-2)** — bulk content generation (fast, cost-effective) * **Claude Haiku 4.5** — content auditing and ranking-drop diagnosis (better at analysis) * **Runware SDK** — AI image generation The generation pipeline enforces structured JSON output with strict constraints: * SEO-optimized titles (<60 chars with focus keyword) * Meta descriptions (exactly 150-160 chars) * Target keyword density of 1-2% * Word count bands: short (500-600), medium (900-1100), long (1400-1600) * Suggested internal links and image placements **Autopilot mode:** Users configure a schedule (daily/weekly/monthly) with a pre-populated topic pool. The system generates and optionally auto-publishes content, pausing automatically after 3+ consecutive failures. ### 3. SEO Intelligence * **DataForSEO** integration for keyword rank tracking (SERP depth 100) * **Backlink analysis** — total backlinks, referring domains, domain authority * **Lighthouse audits** — performance, accessibility, SEO, best practices scores * **On-page SEO scoring** — real-time analysis of title, meta, keyword density, headings, word count * **Weekly content audits** (Wednesday 4AM UTC) — Claude Haiku analyzes blogs with ranking drops, diagnoses issues, suggests fixes with priority levels All SEO APIs use `Promise.allSettled()` for graceful degradation — missing ranking data never blocks site creation or publishing. ### 4. Subscription & Marketplace * Stripe integration with webhook signature validation * **Accumulated credits model** for yearly plans — monthly credits added to a pool rather than hard per-action limits * **Add-on system** — purchased add-ons expand effective limits via `getEffectiveLimits()` utility * **Stripe Connect marketplace** — agencies enable Connect to receive a percentage of client billing * Usage tracking with `canPerformAction()` checks before every billable operation ### 5. Agency & RBAC System **Five user roles:** user, agency, admin, moderator, manager The agency model is elegant: * **Agency users** have `agencyId: null` (they own the agency) * **Managed users** have `agencyId: <agencyClerkId>` * **Resources** track both `clerkId` (direct owner) and `agencyClerkId` * **Ownership middleware** checks agency relationship before falling back to direct ownership * Admins/moderators/managers bypass all ownership checks ## Infrastructure & Operations ### Job Queue Architecture (BullMQ) Schedule | Job | Purpose ---|---|--- Hourly @ :15 | `processBlogSchedules` | Trigger blog autopilot Monday @ 03:00 | `rank-check` | Weekly keyword tracking Wednesday @ 04:00 | `content-audit` | Analyze ranking drops Daily @ 00:00 | `Subscription housekeeping` | Expire trials, reset yearly usage Every 5 min | `Domain workers` | DNS/SSL verification Jobs use explicit `jobId` for idempotency: `rank:${siteId}:${timestamp}` prevents duplicates if cron fires twice. ### Monitoring Stack * **Prometheus** — HTTP request duration histograms, total request counters * **Grafana** — dashboards accessible at `/grafana/` * **Loki** — structured log aggregation via Winston * **Custom error monitor** — classifies severity, throttles identical errors for 5 minutes, only alerts on non-operational errors, sanitizes sensitive fields ### Real-Time Architecture (Socket.IO) * JWT verification via `@clerk/backend verifyToken()` on handshake * Users auto-joined to `user:${clerkId}` rooms (enables multi-tab sync) * Redis adapter for horizontal scaling across server instances * Events: `wp:build:progress`, `wp:build:done`, `wp:build:failed`, `notification:*`, `chat:message` ## What I learned building it ## Key Professional Takeaways ### 1. Full-Sequence Retry > Per-Step Retry for Multi-Step Pipelines When you have a tightly coupled pipeline (like WordPress provisioning), retrying individual steps creates inconsistent state. Retrying the full sequence with cleanup between attempts guarantees atomicity. The tradeoff is speed — but correctness matters more when you're provisioning infrastructure. **When to apply:** Any multi-step process where partial completion leaves the system in an invalid or hard-to-recover state (database migrations, infrastructure provisioning, payment flows). ### 2. Multi-Model LLM Strategy Optimizes Cost and Quality Using different AI models for different tasks isn't just about vendor diversification — it's about matching model strengths to use cases. Fast/cheap models (gpt-4o-mini) handle bulk generation; analytical models (Claude) handle auditing where reasoning quality matters more than speed. **When to apply:** Any AI-heavy product. Profile your LLM calls by volume, latency requirements, and reasoning complexity, then assign models accordingly. ### 3. Accumulated Credits > Hard Limits for Subscription Flexibility Instead of "5 blogs per month" as a hard cap, pooling credits allows users to front-load or spread usage. This reduces churn from users who hit limits early in their billing cycle while still enforcing overall quotas. **When to apply:** Any usage-based SaaS where customers have variable usage patterns within billing periods. ### 4. Graceful Degradation with Promise.allSettled() Third-party APIs will fail. The pattern of wrapping non-critical API calls in `Promise.allSettled()` and continuing with partial data keeps your core flow running. DataForSEO being down shouldn't prevent blog publishing. **When to apply:** Anywhere you aggregate data from multiple external sources. Identify which data is critical vs. enrichment, and only block on the critical path. ### 5. Error Throttling Prevents Alert Fatigue Deduplicating identical errors within a 5-minute window means your team gets one alert for "MongoDB connection timeout" instead of 500. Combined with severity classification (only alert on non-operational errors), this keeps monitoring actionable. **When to apply:** Any production system with error alerting. Without throttling, your team starts ignoring alerts — which is worse than no monitoring at all. ### 6. Job Idempotency via Explicit jobId BullMQ (and most queue systems) accept a `jobId` that prevents duplicate enqueuing. Using deterministic IDs like `rank:${siteId}:${timestamp}` ensures cron-triggered jobs don't double-execute if the scheduler fires twice. **When to apply:** Any queue-based system with scheduled or event-triggered jobs. Always ask: "What happens if this job gets enqueued twice?" ### 7. Agency/Ownership Middleware Pattern The three-tier ownership check (admin bypass → agency relationship → direct ownership) is a clean, composable pattern for multi-tenant SaaS. It's implemented as middleware, keeping route handlers free of authorization logic. **When to apply:** Any platform with B2B features where one organization manages resources on behalf of others (agencies, resellers, white-label products). ### 8. In-Memory Credential Handling for Provisioning WordPress admin credentials are generated, used during setup, saved to the database after successful provisioning, then emailed as a PDF — never logged or stored in plaintext during the process. This minimizes the window where credentials exist in an insecure state. **When to apply:** Any automated provisioning that generates credentials. Think about the lifecycle: generation → usage → persistence → delivery, and minimize exposure at each stage. ### 9. Topic Pools Decouple Generation from Scheduling Rather than generating topics on-the-fly during scheduled runs (which can fail and waste a generation credit), pre-populating a topic pool lets users curate content direction. The scheduler just pulls from the pool. Empty pool? Generate one topic, but the user controls the editorial pipeline. **When to apply:** Any automated content or task system. Separating "what to do" from "when to do it" gives users control without sacrificing automation. ### 10. Metadata Maps for Schema Flexibility Using `metadata: Map` on MongoDB documents allows storing arbitrary data without schema migrations. WP setup logs, publish errors, custom fields — all go in metadata. The core schema stays clean while edge cases are handled flexibly. **When to apply:** Any document-based system where different entities of the same type need different auxiliary data. Prefer typed fields for common data, metadata maps for the long tail. Source: https://github.com/uditrajmr3/neweb-user-dashboard _Originally published on uditraj.site — from the Workshop._
dev.to
November 10, 2026 at 4:38 AM
いつの間にかpostgresqlバックエンドが実装されてて激熱かも
https://docs.bullmq.io/guide/postgresql
PostgreSQL backend | BullMQ
The fastest, most reliable distributed queue for Node.js, Bun, Python, Elixir, .NET, Rust and PHP, on top of Redis or PostgreSQL. Carefully written for rock solid stability and atomicity.
docs.bullmq.io
November 9, 2026 at 5:49 AM
CVE-2026-86005 - chartbrew
The web‑based Chartbrew app (versions before 5.2.3) exposed its internal BullMQ queue‑management page without requiring a login. Anyone who can reach the /apps/queues URL can see job…

Too many irrelevant or confusing CVEs? Use stackflag.com

#chartbrew #CVE #infosec
CVE-2026-86005: Chartbrew lets unauthenticated users view and modify job queues
The web‑based Chartbrew app (versions before 5.2.3) exposed its internal BullMQ queue‑management page without requiring a login.
stackflag.com
November 7, 2026 at 1:50 AM
I just published Beyond Celery: How We Scaled Django to 10M+ Daily Jobs Using BullMQ and Redis medium.com/@sizanmahmud...
Beyond Celery: How We Scaled Django to 10M+ Daily Jobs Using BullMQ and Redis
When building modern web applications with Django, asynchronous processing is non-negotiable. Whether you are generating complex invoice…
medium.com
November 5, 2026 at 4:18 AM
bullmq 2.4.0 [updated]

A powerful, fast, and robust job queue for Elixir backed by Redis

Licenses: MIT
November 4, 2026 at 3:30 AM
Colas de trabajo node.js: la guía para emails diferidos

Descubrí cómo implementar colas de trabajo node.js para programar envíos de email con retraso de forma simple y escalable. ¡Probalo en tu proyecto hoy!

#nodejs #bullmq #amazonsqs #cronjobs #vercel
Colas de trabajo node.js: la guía para emails diferidos
BullMQ, SQS, Temporal o REST: qué cola de trabajo node.js elegir para programar emails diferidos sin duplicados ni cron jobs rotos.
donweb.news
October 24, 2026 at 2:00 AM
what do you guys use for queues?

I used bullmq quite a lot but now started to use pg-boss too.

My stack is highly built on k8s and docker images so I do most of the things my projects need self hosted.
October 22, 2026 at 2:00 PM
I ran both against local Postgres 18 and Redis 8. pg-boss picked up a job on an idle queue in 1.4 s median, because workers poll every 2 s by default. With notify: true on the queue and useListenNotify on the instance it took 16 ms. BullMQ took 2 ms and drained 10k jobs at 12k/s, pg-boss at 6.6k/s.
October 22, 2026 at 2:49 PM
repeat scheduling is live

BullMQ job chaining broke three times before it worked. but it works now.

your best post just runs forever. set a cadence, forget about it, posthive keeps going

i kept hearing "i have posts that always do well, i just want them to keep going." that's the whole feature.
October 20, 2026 at 2:00 PM
Vercel Daemons, in public beta Oct. 15, run Celery, BullMQ and Temporal workers as always-on containers with no HTTP server.

#Firebase #Vercel #Deploy #Docker
Vercel Daemons Put Long-Running Queue Workers on Vercel
Vercel Daemons, in public beta Oct. 15, run Celery, BullMQ and Temporal workers as always-on containers with no HTTP server.
firerun.io
October 18, 2026 at 9:37 AM
Front and back end are both typescript, NextJs for the frontend, custom next server for backend. Database is Gel (graph based layer over postgreSQL). Interface layer is GraphQL on Yoga, websockets use socket.io, and long-running jobs are BullMQ. All runs on OVH on a box hosting docker.
October 17, 2026 at 5:38 PM
Vercel Ship 2026: Python is GA and Vercel Daemons (beta) keeps Celery, BullMQ and Temporal workers running. Can you now run a whole backend on Vercel instead of Render or Railway? Mostly, with a few beta caveats.

https://foundermag.co/launches/vercel-ship-2026/
October 16, 2026 at 9:55 PM
Silent job failures are hard to catch. Learn how to instrument Node.js cron and queue workers with heartbeats and structured events to distinguish…

https://dev.to/leiferiksson8493/nodejs-background-job-heartbeats-detect-missed-node-cron-and-bullmq-runs-lck

#DevOps #platform
October 16, 2026 at 4:30 PM
Success counters and structured start/finish events tell you what a cron or BullMQ job did after it ran. They cannot tell you it never started. If a missed run has to page someone, that needs an external heartbeat monitor, not more in-process metrics.
dev.to
November 3, 2026 at 6:30 PM
Move Slow LLM Calls Off the Request Path with BullMQ in Node.js
If an LLM call can take 20 seconds or more, keep it out of your HTTP handler. Put the work on a BullMQ queue backed by Redis, return a job ID right away with a `202 Accepted`, and let a separate worker make the slow call while the client gets progress updates over Server-Sent Events. The rest of this post is working code for that setup. It covers retries with backoff, concurrency and rate limits, dead-letter handling, and sending progress to the browser. ## Why the request path is the wrong place An inline LLM call looks fine in development. Under real traffic, these things go wrong: * **Timeouts stack up.** Your load balancer, reverse proxy and client each have their own idle timeout. A long generation can go past one of them, and the user sees an error even though the model call worked. * **Retries create duplicates.** When a request times out, the browser or the user tries again. Now you pay for two generations and may write two results. * **Provider limits hit everyone.** A burst of traffic sends a burst of calls straight to the provider. The 429s come back to users as failures. * **Deploys kill work in progress.** Restarting the API process drops every generation that was still running. With a queue, the API stays fast and the slow part has its own retry policy, its own concurrency cap and its own failure handling. ## The shape 1. The client sends `POST /summaries`. The API adds a job and returns `{ jobId }`. 2. A worker process picks up the job, calls the model and saves the result. 3. The client opens `GET /summaries/:jobId/events` and receives progress until the job is done. 4. Jobs that fail permanently go to a dead-letter queue so someone can look at them. Install the packages: npm install bullmq ioredis express ## Shared queue setup // queue.js import { Queue, QueueEvents } from 'bullmq'; import IORedis from 'ioredis'; export function makeConnection() { // BullMQ workers need maxRetriesPerRequest set to null return new IORedis(process.env.REDIS_URL, { maxRetriesPerRequest: null }); } export const llmQueue = new Queue('llm-summaries', { connection: makeConnection() }); export const deadLetterQueue = new Queue('llm-dead-letter', { connection: makeConnection() }); export const llmEvents = new QueueEvents('llm-summaries', { connection: makeConnection() }); Workers and `QueueEvents` use blocking Redis commands. Giving each one its own connection keeps them from getting in each other's way. ## Enqueue and return immediately // api.js app.post('/summaries', async (req, res) => { const { documentId } = req.body; const job = await llmQueue.add( 'summarize', { documentId }, { jobId: 'summary-' + documentId, // same document, same job attempts: 5, backoff: { type: 'exponential', delay: 2000 }, removeOnComplete: { age: 3600 }, removeOnFail: { age: 24 * 3600 }, } ); res.status(202).json({ jobId: job.id }); }); The custom `jobId` is the cheapest deduplication you will get. If a user clicks the button three times, BullMQ will not add a second job with the same ID while the first still exists. Choose the ID based on what makes the work unique, for example the document plus the prompt version. With `attempts: 5` and exponential backoff starting at 2 seconds, retries wait roughly 2, 4, 8 and 16 seconds. That spacing gives a rate-limited provider time to recover. ## The worker: concurrency and rate limits // worker.js import { Worker, UnrecoverableError } from 'bullmq'; import { makeConnection, deadLetterQueue } from './queue.js'; const worker = new Worker( 'llm-summaries', async (job) => { await job.updateProgress({ stage: 'loading', pct: 10 }); const doc = await loadDocument(job.data.documentId); if (!doc) throw new UnrecoverableError('Document not found'); await job.updateProgress({ stage: 'generating', pct: 30 }); const summary = await callModel(doc.text, 60000); await job.updateProgress({ stage: 'saving', pct: 90 }); await saveSummary(job.data.documentId, summary); return { documentId: job.data.documentId }; }, { connection: makeConnection(), concurrency: 8, limiter: { max: 50, duration: 60000 }, } ); These two settings control different things: * **`concurrency`** is how many jobs one worker process runs at the same time. With 3 worker processes at a concurrency of 8, you have at most 24 model calls in flight. * **`limiter`** applies to the whole queue, across all workers. Here it allows 50 jobs per minute. Set it a bit under your provider quota so other services that share the key still have room. If you mix cheap and expensive tasks, such as classification and long-form generation, give them separate queues. Otherwise a pile of slow jobs uses up all the slots and the quick jobs wait behind them. ## Retry the right errors only Retrying a malformed request five times wastes money and slows down the feedback. Sort errors into two groups at the point where you call the model: async function callModel(text, timeoutMs) { try { // llm.summarize is a stand-in for your provider SDK call return await llm.summarize(text, { signal: AbortSignal.timeout(timeoutMs) }); } catch (err) { const status = err.status ?? 0; if ([400, 401, 403, 404, 422].includes(status)) { throw new UnrecoverableError('Model rejected request: ' + err.message); } throw err; // 429, 5xx, network errors and timeouts: let BullMQ retry } } `UnrecoverableError` tells BullMQ to skip the remaining attempts and fail the job right away. Use it for anything that will fail the same way on every attempt. Always set your own timeout on the model call. If the provider hangs and nothing times out, that job keeps its concurrency slot forever. ## Dead-letter handling BullMQ has no built-in dead-letter queue, but it takes a few lines to add one. The worker's `failed` event fires on every failed attempt, so check whether this was the last one: worker.on('failed', async (job, err) => { if (!job) return; const outOfAttempts = job.attemptsMade >= (job.opts.attempts ?? 1); const unrecoverable = err.name === 'UnrecoverableError'; if (outOfAttempts || unrecoverable) { await deadLetterQueue.add('dead', { originalJobId: job.id, data: job.data, reason: err.message, attempts: job.attemptsMade, failedAt: Date.now(), }); } }); A separate dead-letter queue gives you one place to alert on, inspect and replay from. Nobody has to search through the failed set of every queue. One limitation: this handler runs inside the worker process. If the process crashes right after a final failure, the dead-letter write never happens. The job still stays in the failed set for 24 hours because of `removeOnFail`, so a scheduled sweep can fill in anything that was missed. For replays, add a small admin script that reads from the dead-letter queue, fixes the cause and re-adds the job under its original ID. ## Sending progress back to the client Server-Sent Events work well here. They use plain HTTP, the browser reconnects on its own, and you only need data to flow one way. app.get('/summaries/:jobId/events', async (req, res) => { const { jobId } = req.params; res.writeHead(200, { 'Content-Type': 'text/event-stream', 'Cache-Control': 'no-cache', Connection: 'keep-alive', }); const send = (event, data) => res.write('event: ' + event + '\ndata: ' + JSON.stringify(data) + '\n\n'); let closed = false; const onProgress = ({ jobId: id, data }) => { if (id === jobId) send('progress', data); }; const onCompleted = ({ jobId: id }) => { if (id === jobId) { send('done', { resultUrl: '/summaries/' + jobId }); cleanup(); } }; const onFailed = ({ jobId: id, failedReason }) => { if (id === jobId) { send('failed', { reason: failedReason }); cleanup(); } }; function cleanup() { if (closed) return; closed = true; llmEvents.off('progress', onProgress); llmEvents.off('completed', onCompleted); llmEvents.off('failed', onFailed); res.end(); } llmEvents.on('progress', onProgress); llmEvents.on('completed', onCompleted); llmEvents.on('failed', onFailed); req.on('close', cleanup); // The job may have finished before the client connected const job = await llmQueue.getJob(jobId); const state = job ? await job.getState() : 'missing'; if (state === 'completed') onCompleted({ jobId }); else if (state === 'failed' || state === 'missing') onFailed({ jobId, failedReason: state }); }); People often skip the state check at the end. Fast jobs can finish between the `POST` and the moment the browser opens the stream. Without the check, that client waits forever. The `done` event sends a URL, not the result itself. That keeps large outputs out of Redis event payloads, and the client can fetch the result from your database with normal auth checks. Each API process needs only one `QueueEvents` instance. Many open streams will add many listeners, so call `llmEvents.setMaxListeners(0)` or send events to clients through your own lookup keyed by job ID. ## Production checklist * Handle `SIGTERM` with `await worker.close()` so in-flight jobs finish before a deploy. * Run workers as a separate process or container from the API, and scale them separately. * Turn on Redis persistence. Without it, a Redis restart loses every queued job. * Alert on dead-letter queue depth and on the wait time of the oldest job, not only on error counts. * Make `saveSummary` idempotent. A retry after a partial write should overwrite, not duplicate. * Log the job ID, attempt number and token usage on every model call. ## When you do not need a queue If the call usually finishes in a second or two, as with short classification, and the user is waiting on the screen anyway, streaming the response inline is simpler. Use a queue when calls are slow, happen in bursts, cost a lot to repeat, or must survive a deploy. At Geminate Solutions we have built queue-heavy systems, including an exam platform that handled 10M+ requests per minute in production. Most of the problems came from the details above, such as retrying the wrong errors or missing fast completions, more than from the queue library. For the wider picture of adding model calls to a Node.js backend, from provider choice to streaming, see the Node.js AI integration guide. Once these jobs are live, monitoring AI agents in production explains what to watch. The full Node.js AI integration guide is there if you want to keep going.
dev.to
October 10, 2026 at 2:08 AM
hey so for my feed reader I'm using bullmq to handle the fetching of articles. I have the http client set to timeout and to retry. Should I instead put that in the bullmq jobs? where is the line and how do I decide between where to put this sort of logic?
October 6, 2026 at 11:09 PM