Azure Functions Premium plan

The Azure Functions 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

  1. Open the Azure portal from https://portal.azure.com

  2. Select the Create a resource button

    Create resource

  3. Select Compute > Function App.

    Create a function app in the Azure portal

  4. Use the function app settings as specified in the table below the image.

    Basics

    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 a-z (case insensitive), 0-9, and -.
    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 the Next : Hosting > button.

  5. Enter the following hosting settings.

    Hosting

    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.
    Plan Premium For Plan Type, select Premium (Preview) and select defaults for the Windows Plan and Sku and size selections.

    Select the Next : Monitoring > button.

  6. Enter the following monitoring settings.

    Monitoring

    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 where you want to store your data.

    Select Review + Create to review the app configuration selections.

  7. Select Create to provision and deploy the function app.

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 --is-linux option.

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.

Features

The following features are available to function apps deployed to a Premium plan.

Pre-warmed instances

If no events and executions occur today in the Consumption plan, your app may scale down 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.

Elastic Scale Settings

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.

Fore 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. 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 60 minutes for Premium plan apps.

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.

Important

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 selected 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.

SKU Cores Memory Storage
EP1 1 3.5GB 250GB
EP2 2 7GB 250GB
EP3 4 14GB 250GB

Regions

Below are the currently supported regions for each OS.

Region Windows Linux
Australia Central 1
Australia Central 2 1
Australia East
Australia Southeast 1
Brazil South 2
Canada Central
Central US
East Asia
East US 1
East US 2
France Central
Germany West Central
Japan East 1
Japan West
Korea Central
North Central US
North Europe 1
South Central US 1
South India
Southeast Asia 1
UK South
UK West
West Europe 1
West India
West US 1
West US 2

1Maximum scale out limited to 20 instances.
2Maximum scale out limited to 60 instances.

Next steps