Tips > Reliability & Performance

Use Queue Mode With Redis for High-Throughput Deployments

By default, n8n runs in "main" mode where the same process handles the UI, webhook reception, and workflow execution.

By default n8n runs in main mode, where one process handles the UI, webhook reception, and workflow execution. Queue mode separates these: the main process handles the UI and webhook ingestion while dedicated worker processes execute workflows through a Redis-backed queue. This prevents heavy executions from blocking webhooks and lets you scale workers horizontally for high-throughput deployments.

What is queue mode in n8n?

By default, n8n runs in "main" mode where the same process handles the UI, webhook reception, and workflow execution. Queue mode separates these concerns: the main process handles the UI and webhook ingestion, while dedicated worker processes execute workflows via a Redis-backed queue.

How do you configure queue mode with Redis?

Real-world example: A data platform processes 50,000 webhook events per hour. In main mode, heavy workflow executions block the webhook endpoint, causing event loss.

# Main process .env

EXECUTIONS_MODE=queue
QUEUE_BULL_REDIS_HOST=redis
QUEUE_BULL_REDIS_PORT=6379
QUEUE_BULL_REDIS_PASSWORD=your-redis-password
QUEUE_HEALTH_CHECK_ACTIVE=true
# docker-compose.yml for queue mode

services:
  redis:
    image: redis:7-alpine
    command: redis-server --requirepass your-redis-password --maxmemory 512mb
    volumes:
      - redis_data:/data

  n8n-main:
    image: n8nio/n8n:latest
    command: n8n start
    environment:
      - EXECUTIONS_MODE=queue
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_PASSWORD=your-redis-password
    ports:
      - "5678:5678"

  n8n-worker-1:
    image: n8nio/n8n:latest
    command: n8n worker
    environment:
      - EXECUTIONS_MODE=queue
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_PASSWORD=your-redis-password
      - N8N_CONCURRENCY_PRODUCTION_LIMIT=10

  n8n-worker-2:
    image: n8nio/n8n:latest
    command: n8n worker
    environment:
      - EXECUTIONS_MODE=queue
      - QUEUE_BULL_REDIS_HOST=redis
      - QUEUE_BULL_REDIS_PORT=6379
      - QUEUE_BULL_REDIS_PASSWORD=your-redis-password
      - N8N_CONCURRENCY_PRODUCTION_LIMIT=10

volumes:
  redis_data:

How do you scale workers for throughput?

Scale workers horizontally based on your throughput needs. Each worker can process multiple executions concurrently based on the concurrency limit.

Related: Flatten Deeply Nested API Responses · Use Docker Compose with Health Checks for n8n and PostgreSQL

Showcase builds

19 complete workflows from my own projects, each with its n8n workflow JSON to import. Showcase entries link the file at the end of the article.

See the showcase builds

Keep reading

190 entries grouped by topic, from first workflow to queue mode. Free, no signup.

Browse the encyclopedia

Need it built?

I design, build and run n8n systems for clients. Every engagement starts with a $1,500 diagnostic audit, credited toward the build.

Book an introductory call