Azure Function Instance Cap Issue

Gallatin 21V 186 Reputation points
2025-01-17T03:04:00.74+00:00

When there are 50 tasks, the maximum number of instances will expand to 20, and when submitting 50 tasks for multiple tests, it is mostly maintained within this range.

After submitting 50 tasks, submit another 100 tasks with an interval of 1 minute. The maximum number of instances is maintained at around 20, and then submit another 50 tasks 10 minutes later (at this time, the first 150 tasks are still running and 20 instances are running). The number of instances does not increase and remains at around 20;

So my question is, is there a limit on instances in the consumption plan? Why hasn't the number of instances expanded increased as we submit more tasks?

And the parameters are set in hostjson:

"durableTask": {

"maxConcurrentActivityFunctions": 1,

"maxConcurrentOrchestratorFunctions": 1

}

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,425 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shireesha Eeraboina 1,715 Reputation points Microsoft Vendor
    2025-01-22T11:14:05.65+00:00

    Hi @Gallatin 21V ,

    Thank you for your follow-up question.

    When you submit 50 tasks at once, the expectation is that Azure Functions will attempt to scale out and assign instances to handle those tasks. However, the actual number of instances that are allocated can be influenced by several factors, including:

    • Your current settings in host.json limit the number of concurrent activity and orchestrator functions to 1. This can restrict the throughput and prevent the scaling out to the expected number of instances.
    • While the documentation states that the Consumption plan can scale up to 200 instances, this is subject to other constraints, such as regional quotas and subscription limits.
    • If the functions are not invoked frequently enough, Azure may not allocate additional instances immediately, even if there is a sudden increase in tasks.

    To ensure that your Function App can scale effectively, consider adjusting the concurrency settings in your host.json file and monitoring any regional or subscription limits that may apply.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.