The Alternatives Issue For tool owners Sign in

Task queue

A task queue is the backend pattern where work units are submitted to a queue, picked up by workers, and processed asynchronously — Celery, BullMQ, Sidekiq, AWS SQS, Cloud Tasks, Trigger.dev, Inngest are 2026 examples.

In more detail

What it means

Synchronous request → response works for sub-second work; longer tasks (sending emails, processing images, calling slow LLMs, running batch jobs) need async patterns. Task queues solve this: the web request submits a task, returns immediately, workers process in the background. Implementations: Redis-backed (BullMQ, Sidekiq), Postgres-backed (Hatchet, Graphile Worker), cloud-managed (SQS, Cloud Tasks), full-platform (Trigger.dev, Inngest, Defer). Production gotchas: dead-letter handling for permanently failing tasks, retry strategy (exponential backoff vs immediate retry), task deduplication (idempotency keys), monitoring (queue depth, processing time, failure rate). The right primitive for almost any non-trivial backend work.

Part 1 of 2

When to use it, and when not

Use it for

  • Anything that doesn't fit in a single request lifecycle.
  • Email, image processing, batch jobs, LLM calls.

Part 2 of 2

Common mistakes

  • No idempotency — retries process the same task twice.
  • No dead-letter — failing tasks loop forever.

FAQ

Questions readers ask.

What is task queue?

A task queue is the backend pattern where work units are submitted to a queue, picked up by workers, and processed asynchronously — Celery, BullMQ, Sidekiq, AWS SQS, Cloud Tasks, Trigger.dev, Inngest are 2026 examples.

When should you use task queue?

Anything that doesn't fit in a single request lifecycle. Email, image processing, batch jobs, LLM calls.

What are the common mistakes with task queue?

No idempotency — retries process the same task twice. No dead-letter — failing tasks loop forever.

Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/task-queue.md. Found a mistake? Tell us.