azure-docs
azure-docs copied to clipboard
What are the defaults values of "maxConcurrentActivityFunctions" and "maxConcurrentOrchestratorFunctions"?
What are the defaults values of maxConcurrentActivityFunctions
and maxConcurrentOrchestratorFunctions
?
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
- ID: afd094d0-fb49-e206-2f99-c3fec27bb20f
- Version Independent ID: 42fd1479-2478-3137-b43e-da13a4c10a48
- Content: Performance and scale in Durable Functions - Azure
- Content Source: articles/azure-functions/durable/durable-functions-perf-and-scale.md
- Service: azure-functions
- Sub-service: durable
- GitHub Login: @cgillum
- Microsoft Alias: azfuncdf
@GP4cK Thanks for your feedback! We will investigate and update as appropriate.
@GP4cK I have got the confirmation from my team that the maximum value for the maxConcurrency parameters (by maxConcurrentActivityFunctions and maxConcurrentOrchestratorFunctions is Int32.MaxValue which is 2147483647.
If you set the limit that high, in practice that just means that you want “no limit” (because concurrency will never even get near to that number).
@MayankBargali-MSFT thanks but I'm asking for the default values.
If I don't specify maxConcurrentActivityFunctions
or maxConcurrentOrchestratorFunctions
in my host.json and I use the fan out / fan in pattern with 100 activities for example, how many activities will run concurrently?
@GP4cK The maxConcurrentOrchestratorsDefault is 5 or 10 * Environment process count and maxConcurrentActivitiesDefault is 10 or 10 * Environment processor count
The max number of activities that run concurrently in a function app is then (number of worker nodes) * (maxConcurrentActivitiesDefault) So, this number depends on the scale out (because the limit is applied per worker node).
When considering the value to use for maxConcurrentActivitiesDefault, the main consideration is usually the local resources a function requires to run, like memory or CPU. Setting this limit low can help to avoid running out of memory or oversubscribing the CPU (because it prevents running too many of these functions on a single node and instead distributes them over more nodes). However, some activities consume almost no resources to speak of (e.g. an async call to an external service), so for those situations setting it to 100 or higher is no problem and can speed up your app.
We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.