Why queue mode will help if I receive too many requests in a short period of time?

Describe the issue/error/question

Why or how will queue mode help if I receive too many requests in a short period of time?

I need to scale my setup because I’m running too many repetitive tasks, and I’m growing in the webhooks I receive per minute/second.

I got an outage where many repetitive tasks were running and received many webhooks simultaneously. Then the CPU went to 100%, and the server was blocked.

I had to hard reset it and power it again…

But I have some questions because I don’t understand how the queue system would help at all…
What is the difference between having 1 n8n instance running and receiving 50 webhooks in one second and trying to execute them?
or
have 1 n8n instance running as “main” and receive 50 webhooks in one second and 2 workers to execute the workflows?

Why would the first one fail and the second one not when both get the same amount of work in a short time?

I mean, what is the “killing action” for the n8n instances, the “start processing” or the “receive too many webhooks”? How I can check how many webhooks/sec my n8n instance can process?

I’m running a Debian server with AMD Premium hardware: 2 vCPUs, 2GB RAM, and 50GB SSD.

Thanks!

3 Likes

I came here looking for the exact same answer. Running into the same problem and I’m not sure if just throwing more power at 1 instance makes sense or moving to queue mode does.

Queue mode got created to run it on different instances. You are supposed to run the main instance on an instance and then each worker also on its own separate one.
Running it on the same instances does really not help (potentially makes it even worst). The only exception would be if the workflows are very CPU heavy and the instance has multiple CPUs.