The idea is:
Allow the Task Broker on the main n8n instance to be disabled. This ideally could be done by a specific environment variable to replace N8N_RUNNERS_ENABLED which is now, understandably, deprecated, or through some logic based on existing environment variables (i.e. OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS, EXECUTIONS_MODE and N8N_RUNNERS_MODE)
My use case:
I run n8n self-hosted in Kubernetes, in Queue mode with Webhook processors deployed with N8N_RUNNERS_MODE as ‘External’ and OFFLOAD_MANUAL_EXECUTIONS_TO_WORKERS set to True.
There should not be a situation where the main instance is responsible for executing code nodes, or even workflows. Therefore I don’t want a broker needlessly running on my main n8n instance.
I currently don’t have a way of disabling this behaviour as the broker initialization is only skipped if runners are disabled (they are hard coded as enabled = true since v2.0.0) or marked as needsTaskRunner = false by the n8n command (the start command has needsTaskRunner = true)
I think it would be beneficial to add this because:
It will reduce resource consumption and remove a unneeded listening port on the main n8n instance.
Any resources to support this?
Broker/Runner initialization: n8n/packages/cli/src/commands/base-command.ts at 386979a27cfe0b22657d3da947b37c0f040ca931 · n8n-io/n8n · GitHub
n8n runner config: n8n/packages/@n8n/config/src/configs/runners.config.ts at 386979a27cfe0b22657d3da947b37c0f040ca931 · n8n-io/n8n · GitHub
n8n start command: n8n/packages/cli/src/commands/start.ts at 386979a27cfe0b22657d3da947b37c0f040ca931 · n8n-io/n8n · GitHub
Are you willing to work on this?
Yes with approval of this suggestion