N8n Multi-server configuration

Hi everyone,
We are running a local n8n k8s setup with 1 API Server and about 10 workers.

kubectl get pod -A | grep n8n                                     

n8n             n8n-6dd57c4f5d-8kr5h
n8n             n8n-worker-54f849855c-75qh5
n8n             n8n-worker-54f849855c-cggsj
n8n             n8n-worker-54f849855c-dl798
n8n             n8n-worker-54f849855c-jzllx
n8n             n8n-worker-54f849855c-k8cq4
n8n             n8n-worker-54f849855c-lkgls
n8n             n8n-worker-54f849855c-ngqwt
n8n             n8n-worker-54f849855c-qd4wg
n8n             n8n-worker-54f849855c-wp4dn

Having just one main api server node is not too scalable or robust, though. Is there some documentation on how to implement a multi-server please?

Current server configuration: apiVersion: v1kind: Podmetadata: annotations: admission.datadoghq.co - Pastebin.com

Any ideas please?

Information on your n8n setup

  • n8n version: image: ‘docker.io/n8nio/n8n:1.37.2
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

n8n supports running multiple main servers in queue mode. To enable this, you need:
Configuring queue mode | n8n Docs
Queue mode environment variables | n8n Docs
Queue mode environment variables | n8n Docs
Performance and benchmarking | n8n Docs
You can look here.

3 Likes

@msar Also you may look into having more webhook nodes

n8n doesn’t recommend adding the main process to the load balancer pool. If you add the main process to the pool, it will receive requests and possibly a heavy load. This will result in degraded performance for editing, viewing, and interacting with the n8n UI.

For Multi-main setup it looks like it part of enterprise license, while it enables HA but you should be okay with just more workers and webhook nodes etc.

So one example, is say if you dont want to expose the GUI publically, u can deploy webhook nodes which are exposed, but the main isn’t exposed outside of ure lan / private network ideal in some instances more for security than scailing.

1 Like

Thank you.

1 Like

Thank you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.