Course/Chapter 10/3. Queue Mode & Worker Scaling
    advanced
    Chapter 10: Scaling & Production Best Practices

    3. Queue Mode & Worker Scaling

    Configure n8n for high concurrency with Redis.

    15m Lesson 3 of 5

    Queue mode separates webhook reception from workflow execution, allowing you to scale workers horizontally.

    Code Examples

    Queue Mode Docker Compose
    yaml
    services:
      n8n-main:
        image: n8nio/n8n
        environment:
          - EXECUTIONS_MODE=queue
          - QUEUE_BULL_REDIS_HOST=redis
        # Main instance handles webhooks
    
      n8n-worker:
        image: n8nio/n8n
        command: worker
        environment:
          - EXECUTIONS_MODE=queue
          - QUEUE_BULL_REDIS_HOST=redis
        deploy:
          replicas: 3  # Scale workers
    
      redis:
        image: redis:7-alpine

    Pro Tips

    • 💡Start with 2–3 workers and scale based on queue depth — monitor with Redis CLI

    Comprehension Quiz

    Answer 2 of 2 correctly to unlock lesson completion.

    1. What does queue mode separate?

    2. What external service does queue mode require?

    Pass the quiz above to unlock lesson completion