Skip to content

[BUG/ENHANCEMENT] Internal taskrunners don't scale properly + Conflicts with external workers/webhooks #220

@neondeex

Description

@neondeex

Problem Summary

The current chart is not optimized for n8n 1.0+'s new internal taskrunners architecture, causing scalability issues and conflicting configurations between components for example websockets.

Issues Identified

  1. Internal taskrunners vs External workers
  • Internal taskrunners: New, better for HA, shared memory
  • External workers: Legacy, issues with WebSockets and AI agents tool usage
  • Current chart: Primarily designed for external workers
  1. Webhook + Taskrunners Conflict

Current problematic configuration

webhook:
enabled: true # Separate webhook pods
main:
taskrunners: internal # Only in main pods

Result: Webhooks enqueue jobs but no taskrunners to execute them

  1. Scalability Limits
  • Webhooks: Single-thread, ~5,000 req/min per pod
  • TaskRunners: Multi-threaded, scale well
  • WebSockets: Break with multiple main pods

Current Problematic Configuration

This DOESN'T work well

main:
replicaCount: 2
webhook:
enabled: true # Jobs go to queue
worker:
enabled: false # No executors available

Result: Jobs queued forever

Working Configurations

Option 1: Single Powerful Main Pod (Recommended)

main:
replicaCount: 1
resources:
limits:
cpu: "8000m"
memory: "16Gi"
taskrunners: internal

webhook:
enabled: false # Webhooks go to main pod

worker:
enabled: false # Not needed with taskrunners

Option 2: Multiple main pods + Sticky sessions

main:
replicaCount: 3
# Requires additional load balancer configuration

Critical Environment Variables

extraEnv:
- name: N8N_RUNNERS_ENABLED
value: "true"
- name: OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS
value: "false" # CRITICAL: must be false with taskrunners
- name: EXECUTIONS_MODE
value: "queue" # Or "regular" for lower latency

Proposed Improvements

  1. Taskrunners preset:

values.yaml

preset: "taskrunners" # Auto-configures everything correctly

  1. Configuration validation:

Prevent incompatible configurations

if webhook.enabled && !worker.enabled && taskrunners.internal:
error: "External webhooks require external workers or disable webhooks"

  1. Clear documentation about:
    - When to use taskrunners vs workers
    - Scalability limits
    - Sticky sessions configuration

Test Environment

  • n8n version: 1.102.4
  • Kubernetes: 1.28+
  • Istio: For load balancing
  • Chart version: 1.0.10

Does this chart officially support internal taskrunners or only external workers?

The documentation is unclear about taskrunner support and default configurations lead to incompatible setups.

Additional Context

We've tested extensively and found that:

  • Internal taskrunners work great for single powerful pods
  • External webhooks + internal taskrunners = jobs stuck in queue
  • WebSockets and AI agents break with traditional worker architecture
  • The chart needs better guidance on modern n8n deployment patterns

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions