How can I scale up from Azure Functions Consumption Plan?

Ignacio Alvarez Arenas 136 Reputation points
2022-03-22T13:39:18.473+00:00

Sometimes for troubleshooting purposes or resource issues I would like to scale up my Azure function Consumption Plan. Is that possible?

"This question is being posted as part of an internal effort at Microsoft to share emerging content with the community. A Microsoft employee will be following up with an answer shortly. If you have feedback regarding this issue, we encourage the community to start a discussion in the comments."

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

1 answer

Sort by: Most helpful
  1. Ignacio Alvarez Arenas 136 Reputation points
    2022-03-22T13:42:01.777+00:00

    So while in dedicated environments scaling up and down is something we can do easily, in Consumption plan there is no such feature. The most similar operation would be to migrate to another tier (Elastic Premium or Dedicated), but going from Consumption to a dedicated environment is not possible, at that level a redeployment would be needed. What is possible is to go from Consumption to Elastic Premium, basically migrating the Function app from one tier to the other.

    Unfortunately, this operation of moving from Consumption to Elastic Premium is not possible from the Portal, but it is totally possible with Azure CLI. This process below would be the required steps to do so:

    1) Create the new Elastic Premium Plan. Place it on the same Resource Group as the original application. You can do it in the Portal if needed, but the Azure CLI command would be:

    az functionapp plan create -n [YOURNAMEOFPLAN] --sku EP1 --min-instances 2 --max-burst 2 -g [YOURRESOURCEGROUPNAME] --> the SKU can be changed

    2) Take not of the current consumption plan Resource ID in case it was required to rollback. You can find it in the tab Properties of the Consumption App Service Plan. Also take note in the same way of the resourceID of the new Elastic Premium plan.

    3) Then you just simply need to run the following command to update the plan.

    az functionapp update --plan [RESOURCEIDOFNEWPLAN] -n [NAMEOFYOURFUNCTION] -g [YOURRESOURCEGROUPNAME]

    So to rollback it would be the same command but using the resourceID of the Consumption plan instead. As well to scale down it will be required to use --force and it will ask for confirmation.

    Be aware that despite it is possible to do it one way or another (Consumption ---> Elastic Premium or Elastic Premium --> Consumption) if you had any special features such as VNET integration in Elastic Premium those will not work in Consumption. Azure CLI will remind you of this fact but it is really important to keep it in mind.

    2 people found this answer helpful.

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.