From d143b2c38162eb61356ebf457672ffb16075f381 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 17 Jul 2026 13:06:00 +0200 Subject: [PATCH 1/2] fix(chart): use correct Bull queue key bull:jobs:wait in KEDA examples The KEDA Redis-list scaler examples pointed at bull:default:wait, but n8n names its Bull queue 'jobs' (QUEUE_NAME = 'jobs'), with default prefix 'bull'. Bull composes keys as ::, so the waiting-list key is bull:jobs:wait. As written, LLEN bull:default:wait always returns 0, so queue-depth autoscaling never fires and the ScaledObject silently falls back to any other triggers. Prefix stays overridable via QUEUE_BULL_PREFIX. Fixes #173 Co-Authored-By: Claude Opus 4.8 --- charts/n8n/README.md | 2 +- charts/n8n/examples/keda-autoscaling.yaml | 2 +- charts/n8n/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/charts/n8n/README.md b/charts/n8n/README.md index 2e2b1999..1c36af4c 100644 --- a/charts/n8n/README.md +++ b/charts/n8n/README.md @@ -227,7 +227,7 @@ keda: triggers: - type: redis metadata: - listName: "bull:default:wait" + listName: "bull:jobs:wait" listLength: "5" ``` diff --git a/charts/n8n/examples/keda-autoscaling.yaml b/charts/n8n/examples/keda-autoscaling.yaml index 61286d68..ae946aee 100644 --- a/charts/n8n/examples/keda-autoscaling.yaml +++ b/charts/n8n/examples/keda-autoscaling.yaml @@ -32,7 +32,7 @@ keda: # Leave empty to auto-derive from redis.host:redis.port address: "" # Bull queue key for waiting jobs - listName: "bull:default:wait" + listName: "bull:jobs:wait" # Scale up when queue length exceeds 5 per replica listLength: "5" authenticationRef: diff --git a/charts/n8n/values.yaml b/charts/n8n/values.yaml index 21dd2d1e..90f1cfcb 100644 --- a/charts/n8n/values.yaml +++ b/charts/n8n/values.yaml @@ -501,7 +501,7 @@ keda: # Redis address (auto-derived from redis.host:redis.port if empty) address: "" # Bull queue waiting list key - listName: "bull:default:wait" + listName: "bull:jobs:wait" # Target queue length per worker replica listLength: "5" authenticationRef: From ce6b743a102759474f48700e12a00e20fa04d4db Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 17 Jul 2026 13:13:29 +0200 Subject: [PATCH 2/2] docs(chart): note listName must track redis.prefix for KEDA scaling The KEDA Redis trigger's listName is passed through to the ScaledObject verbatim and does not derive from redis.prefix. n8n writes the Bull key as :jobs:wait, so a customized redis.prefix desyncs it from the default bull:jobs:wait and queue-depth autoscaling stops firing. Document that the two must be kept in sync (addresses cubic review on #174). Co-Authored-By: Claude Opus 4.8 --- charts/n8n/README.md | 2 ++ charts/n8n/examples/keda-autoscaling.yaml | 3 ++- charts/n8n/values.yaml | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/charts/n8n/README.md b/charts/n8n/README.md index 1c36af4c..7b73301c 100644 --- a/charts/n8n/README.md +++ b/charts/n8n/README.md @@ -231,6 +231,8 @@ keda: listLength: "5" ``` +The `listName` is the Bull waiting-list key, `:jobs:wait`, where the prefix defaults to `bull`. If you set `redis.prefix`, update `listName` to match (e.g. `myprefix:jobs:wait`), otherwise the scaler polls a key n8n never writes to and queue-depth autoscaling won't fire. + See [keda-autoscaling.yaml](./examples/keda-autoscaling.yaml) for a complete example. ## Upgrading diff --git a/charts/n8n/examples/keda-autoscaling.yaml b/charts/n8n/examples/keda-autoscaling.yaml index ae946aee..835c8ef2 100644 --- a/charts/n8n/examples/keda-autoscaling.yaml +++ b/charts/n8n/examples/keda-autoscaling.yaml @@ -31,7 +31,8 @@ keda: metadata: # Leave empty to auto-derive from redis.host:redis.port address: "" - # Bull queue key for waiting jobs + # Bull queue key for waiting jobs: ":jobs:wait" (prefix defaults + # to "bull"). If you set redis.prefix, update this to ":jobs:wait". listName: "bull:jobs:wait" # Scale up when queue length exceeds 5 per replica listLength: "5" diff --git a/charts/n8n/values.yaml b/charts/n8n/values.yaml index 90f1cfcb..3cd74a6d 100644 --- a/charts/n8n/values.yaml +++ b/charts/n8n/values.yaml @@ -500,7 +500,8 @@ keda: metadata: # Redis address (auto-derived from redis.host:redis.port if empty) address: "" - # Bull queue waiting list key + # Bull queue waiting list key: ":jobs:wait" (prefix defaults to + # "bull"). If you set redis.prefix, update this to match, e.g. "myprefix:jobs:wait". listName: "bull:jobs:wait" # Target queue length per worker replica listLength: "5" @@ -638,7 +639,7 @@ redis: # Advanced Redis settings database: 0 # <-- Redis database number timeout: 10000 # <-- Redis timeout threshold (ms) - prefix: "" # <-- Queue key prefix + prefix: "" # <-- Queue key prefix (if set, update keda.worker.triggers listName to ":jobs:wait") tls: false # <-- Enable TLS (required for AWS ElastiCache and other managed Redis services) dualstack: false # <-- Enable dual-stack (IPv4/IPv6) # Redis Cluster support (comma-separated list of host:port)