Does Function Apps scale instances automatically if an instance can’t start properly, and another if that instance can’t start, etc.?

Leif Rask 1 Reputation point

A question: if a function app has network issues connecting to its storage and as such can’t start, would the container scale up more instances to try to cope? If the second one can’t start for the same reason, does it spin up a third and so on to the limit? It seems so, but checking as it doesn’t make sense, and the cost blows out.

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

1 answer

Sort by: Most helpful
  1. JananiRamesh-MSFT 23,566 Reputation points

    @Leif Rask Thanks for reaching out. If a function app has network issues connecting to its storage and can't start, the Azure Functions runtime will attempt to retry the connection for a certain period of time before giving up. During this time, the container hosting the function app will not be scaled up to create additional instances.

    It's important to note that scaling up the container to create additional instances will not resolve network issues with the storage. Instead, you should investigate and resolve the underlying network issues to ensure that the container can connect to the storage and start successfully.

    Scaling happens if there is high load on the instance. For more Information, refer this article how scale works in Azure functions

    And for some reason, if Instance having any issue at the platform level and a new Instance will be replaced by platform. This would not charge for two instances , it charges for single instance. Consumption/Dedicated/Elastic premium/Flex consumption have different billing mechanism

    For more details Refer:

    do let me know incase of further queries, I would be happy to assist you.