Dedicated hosting plans for Azure Functions
This article is about hosting your function app in an App Service plan, including in an App Service Environment (ASE). For other hosting options, see the hosting plan article.
An App Service plan defines a set of compute resources for an app to run. These compute resources are analogous to the server farm in conventional hosting. One or more function apps can be configured to run on the same computing resources (App Service plan) as other App Service apps, such as web apps. These plans include Basic, Standard, Premium, and Isolated SKUs. For details about how the App Service plan works, see the Azure App Service plans in-depth overview.
Consider an App Service plan in the following situations:
- You have existing, underutilized VMs that are already running other App Service instances.
- You want to provide a custom image on which to run your functions.
You pay for function apps in an App Service Plan as you would for other App Service resources. This differs from Azure Functions Consumption plan or Premium plan hosting, which have consumption-based cost components. You are billed only for the plan, regardless of how many function apps or web apps run in the plan. To learn more, see the App Service pricing page.
If you run on an App Service plan, you should enable the Always on setting so that your function app runs correctly. On an App Service plan, the functions runtime goes idle after a few minutes of inactivity, so only HTTP triggers will "wake up" your functions. The Always on setting is available only on an App Service plan. On a Consumption plan, the platform activates function apps automatically.
Even with Always On enabled, the execution timeout for individual functions is controlled by the
functionTimeout setting in the host.json project file.
Using an App Service plan, you can manually scale out by adding more VM instances. You can also enable autoscale, though autoscale will be slower than the elastic scale of the Premium plan. For more information, see Scale instance count manually or automatically. You can also scale up by choosing a different App Service plan. For more information, see Scale up an app in Azure.
App Service Environments
Running in an App Service Environment (ASE) lets you fully isolate your functions and take advantage of higher numbers of instances than an App Service Plan. To get started, see Introduction to the App Service Environments.
Submit and view feedback for