Azure Functions Premium plan
The Azure Functions Premium plan (sometimes referred to as Elastic Premium plan) is a hosting option for function apps. The Premium plan provides features like VNet connectivity, no cold start, and premium hardware. Multiple function apps can be deployed to the same Premium plan, and the plan allows you to configure compute instance size, base plan size, and maximum plan size. For a comparison of the Premium plan and other plan and hosting types, see function scale and hosting options.
Create a Premium plan
From the Azure portal menu or the Home page, select Create a resource.
In the New page, select Compute > Function App.
On the Basics page, use the function app settings as specified in the following table:
Setting Suggested value Description Subscription Your subscription The subscription under which this new function app is created. Resource Group myResourceGroup Name for the new resource group in which to create your function app. Function App name Globally unique name Name that identifies your new function app. Valid characters are
Publish Code Option to publish code files or a Docker container. Runtime stack Preferred language Choose a runtime that supports your favorite function programming language. Choose .NET for C# and F# functions. Region Preferred region Choose a region near you or near other services your functions access.
Select Next: Hosting. On the Hosting page, enter the following settings:
Setting Suggested value Description Storage account Globally unique name Create a storage account used by your function app. Storage account names must be between 3 and 24 characters in length and may contain numbers and lowercase letters only. You can also use an existing account, which must meet the storage account requirements. Operating system Preferred operating system An operating system is pre-selected for you based on your runtime stack selection, but you can change the setting if necessary. Python is only supported on Linux. Plan Premium Hosting plan that defines how resources are allocated to your function app. Select Premium. By default, a new App Service plan is created. The default Sku and size is EP1, where EP stands for elastic premium. To learn more, see the list of Premium SKUs.
Select Next: Monitoring. On the Monitoring page, enter the following settings:
Setting Suggested value Description Application Insights Default Creates an Application Insights resource of the same App name in the nearest supported region. By expanding this setting, you can change the New resource name or choose a different Location in an Azure geography to store your data.
Select Review + create to review the app configuration selections.
On the Review + create page, review your settings, and then select Create to provision and deploy the function app.
Select the Notifications icon in the upper-right corner of the portal and watch for the Deployment succeeded message.
Select Go to resource to view your new function app. You can also select Pin to dashboard. Pinning makes it easier to return to this function app resource from your dashboard.
You can also create a Premium plan using az functionapp plan create in the Azure CLI. The following example creates an Elastic Premium 1 tier plan:
az functionapp plan create --resource-group <RESOURCE_GROUP> --name <PLAN_NAME> \ --location <REGION> --sku EP1
In this example, replace
<RESOURCE_GROUP> with your resource group and
<PLAN_NAME> with a name for your plan that is unique in the resource group. Specify a supported
<REGION>. To create a Premium plan that supports Linux, include the
With the plan created, you can use az functionapp create to create your function app. In the portal, both the plan and the app are created at the same time. For an example of a complete Azure CLI script, see Create a function app in a Premium plan.
The following features are available to function apps deployed to a Premium plan.
If no events and executions occur today in the Consumption plan, your app may scale in to zero instances. When new events come in, a new instance needs to be specialized with your app running on it. Specializing new instances may take some time depending on the app. This additional latency on the first call is often called app cold start.
In the Premium plan, you can have your app pre-warmed on a specified number of instances, up to your minimum plan size. Pre-warmed instances also let you pre-scale an app before high load. As the app scales out, it first scales into the pre-warmed instances. Additional instances continue to buffer out and warm immediately in preparation for the next scale operation. By having a buffer of pre-warmed instances, you can effectively avoid cold start latencies. Pre-warmed instances is a feature of the Premium plan, and you need to keep at least one instance running and available at all times the plan is active.
You can configure the number of pre-warmed instances in the Azure portal by selected your Function App, going to the Platform Features tab, and selecting the Scale Out options. In the function app edit window, pre-warmed instances is specific to that app, but the minimum and maximum instances apply to your entire plan.
You can also configure pre-warmed instances for an app with the Azure CLI.
az resource update -g <resource_group> -n <function_app_name>/config/web --set properties.preWarmedInstanceCount=<desired_prewarmed_count> --resource-type Microsoft.Web/sites
Private network connectivity
Azure Functions deployed to a Premium plan takes advantage of new VNet integration for web apps. When configured, your app can communicate with resources within your VNet or secured via service endpoints. IP restrictions are also available on the app to restrict incoming traffic.
When assigning a subnet to your function app in a Premium plan, you need a subnet with enough IP addresses for each potential instance. We require an IP block with at least 100 available addresses.
For more information, see integrate your function app with a VNet.
Rapid elastic scale
Additional compute instances are automatically added for your app using the same rapid scaling logic as the Consumption plan. Apps in the same App Service Plan scale independently from one another based on the needs of an individual app. However, Functions apps in the same App Service Plan share VM resources to help reduce costs, when possible. The number of apps associated with a VM depends on the footprint of each app and the size of the VM.
To learn more about how scaling works, see Function scale and hosting.
Longer run duration
Azure Functions in a Consumption plan are limited to 10 minutes for a single execution. In the Premium plan, the run duration defaults to 30 minutes to prevent runaway executions. However, you can modify the host.json configuration to make this unbounded for Premium plan apps (guaranteed 60 minutes).
Plan and SKU settings
When you create the plan, you configure two settings: the minimum number of instances (or plan size) and the maximum burst limit. Minimum instances are reserved and always running.
You are charged for each instance allocated in the minimum instance count regardless if functions are executing or not.
If your app requires instances beyond your plan size, it can continue to scale out until the number of instances hits the maximum burst limit. You are billed for instances beyond your plan size only while they are running and rented to you. We will make a best effort at scaling your app out to its defined maximum limit, whereas the minimum plan instances are guaranteed for your app.
You can configure the plan size and maximums in the Azure portal by selecting the Scale Out options in the plan or a function app deployed to that plan (under Platform Features).
You can also increase the maximum burst limit from the Azure CLI:
az resource update -g <resource_group> -n <premium_plan_name> --set properties.maximumElasticWorkerCount=<desired_max_burst> --resource-type Microsoft.Web/serverfarms
Available instance SKUs
When creating or scaling your plan, you can choose between three instance sizes. You will be billed for the total number of cores and memory consumed per second. Your app can automatically scale out to multiple instances as needed.
Memory utilization considerations
Running on a machine with more memory does not always mean that your function app will use all available memory.
languageWorkers:node:arguments with a value of
--max-old-space-size=<max memory in MB>.
Region Max Scale Out
Below are the currently supported maximum scale out values for a single plan in each region and OS configuration. To request an increase please open a support ticket.
See the complete regional availability of Functions here: Azure.com
|Australia Central||20||Not Available|
|Australia Central 2||20||Not Available|
|East US 2||100||20|
|Germany West Central||100||Not Available|
|North Central US||100||20|
|South Central US||100||20|
|South India||100||Not Available|
|West Central US||20||20|
|West US 2||100||20|