Hello! ![]()
I have been facing issues in getting clarity with how concurrency works.
Let’s all contribute to this megathread and make it super clear for every n8n builder. Past, present, future.
Hello! ![]()
I have been facing issues in getting clarity with how concurrency works.
Let’s all contribute to this megathread and make it super clear for every n8n builder. Past, present, future.
Q: How is concurrency measured?
When an active workflow is triggered by a webhook or another type of trigger node, that counts as 1 instance. When it is triggered multiple times at the same moment, they run in parallel. If 5 instances are running in parallel, you have have concurrency of 5.
Q: When is a workflow trigger not counted towards concurrency?
Q: How long does a concurrency last?
As long as your workflow is still running & hasn’t concluded to a success or error outcome, it is a concurrent instance. Based on your plan, you can run multiple instances in parallel up to the limit. Any more triggers at that point will sit in a queue, until one of the running instances finish up (be it success or error).
Q: If an instance fails, does the retry count towards concurrency?
Yes it does. Once a run fails, that instance is over. If you have set the limit to not retry after error there won’t be any new concurrenct instances for that trigger event. Otherwise, the workflow will try to re-run the input a few more times before giving up. Each try is a concurrent instance.
Q: When a production workflow triggers a sub-workflow, does that mean the concurrency count for production workflow is back to ZERO? Or will it wait for sub-workflow to complete?
Q: Do sub-workflows triggered by a production workflow count towards concurrency?
Q: Do sub-workflows have their own concurrency limit?
Could you define Concurrency?
There is a Concurrency limit on cloud but also Concurrency on selfhosted instances where you have your main instance or a queue mode setup with concurrency in the workers.
@BramKn The current workflow I am working on is on cloud. When a workflow sends the data to a sub-worklow and has no other tasks, does that mean the workflow is now free? On that note, do sub-workflows have their own concurrency limit?
I do not know for sure.
But a subflow is not counted towards executions and on selfhosted they are running within the same container that executes the parent flow. So I assume it counts as 1.
@BramKn got it. How much time did it take to move from cloud to self-hosted?
It all depends. I never moved to self-hosted really, as I have been working with n8n since before Cloud was a thing. ![]()
Also cloud is best for loads of users.
Self-hosted comes with its challenges.
@BramKn That is mad impressive! I am building beta version of my conversation app. Could go up to 1000 users triggering the workflow at the same time. Do you think self hosted would have issues in handling this?
That depends on how you set it up. There is plenty of docs and examples out there. If you struggle understanding these, it might not be best to try self-hosting as it will only result in security issues probably.
Cloud should also be able to handle this maybe, not sure.