How to properly scale n8n with heavy compute workflows + queue mode issues

Hey everyone,

we’re currently running into scaling issues with n8n and I was wondering if anyone here has real-world experience or advice.

We have some very compute-heavy workflows — for example, workflows that scan through directories on a server and then use Code Nodes to extract structured information that’s needed for customer-facing processes. This leads to high system load, and while we’re monitoring everything via Grafana, we’re hitting performance ceilings.

We’ve been experimenting with queue mode to handle the load better. We managed to start the workers, but the problem is:

It looks like the workers don’t actually pick up or execute jobs.

The official n8n docs don’t really provide enough detail on properly configuring queue mode for production use.

So my questions are:

What are best practices to scale n8n when you have CPU-intensive workflows?

How should we correctly configure queue mode so that workers reliably process executions?

Are there any common pitfalls when setting this up (e.g., Redis config, environment variables, worker management, etc.) that we should watch out for?

Any tips, examples, or references from your own setups would be super appreciated!

Thanks a lot in advance :folded_hands:

Hi @Hepole

There are some docker compose examples that would show how to setup queue mode.
Should also be on the n8n github repo.

n8n is single threaded(last time I checked) so going with a queue mode setup is required if you run at scale.
Next to using queue mode I like to use a queue like RabbitMQ to make sure there isn’t any spikes in processing that can be spread out over time.
Also helps to parallelise things as the native trigger node for RabbitMQ makes that very very simple.
Of course workflow design might need to be modified a bit to make sure all is efficient though.

Hope this helps.

(post deleted by author)

@Zelite
What is “N8N_LEADER_SELECTION_ENABLED”?
Can you point me to the right docs on that? Do not see it anywhere in the docs.

Great Question @Hepole
Couple things to check:

  • Queue mode only works if Redis is up and both your main n8n and workers can talk to it. If workers aren’t picking up, 99% of the time it’s bad Redis config. Make sure QUEUE_BULL_REDIS_* env vars are the same everywhere.

  • Your main n8n runs as “manager” → EXECUTIONS_PROCESS=queue.

  • Workers run with N8N_MODE=worker + EXECUTIONS_PROCESS=queue.

If that’s right, as soon as you trigger a workflow, Redis queues it and a worker should grab it.

For heavy workflows:

  • Don’t spin 10 tiny workers, spin fewer with more CPU.

  • Watch out for Code nodes doing massive loops — sometimes better to push that logic outside n8n.

  • Add limits/timeouts so one monster job doesn’t choke the whole thing.

That’s it. Once Redis is solid and env vars match, workers will just work.