Configure zone redundancy for Azure Functions

Zone redundancy enables your function apps to be resilient to problems in Azure availability zones, so your app remains available when a datacenter or zone has an outage. This article provides step-by-step guidance for configuring Azure Functions to be zone-redundant, depending on your hosting plan. For information about how availability zones work with Azure Functions, see Reliability in Azure Functions.

Availability zone configuration for Azure Functions depends on your Functions hosting plan:

Hosting plan Support level Configuration section
Elastic Premium plan GA Select Premium at the top of this article.
Consumption plan n/a Not supported by the Consumption plan.

Important

Important

Before configuring zone redundancy, review the requirements and details listed in Reliability in Azure Functions - Resilience to availability zone failures.

You can enable or disable availability zones on existing Elastic Premium plans using the Azure CLI. See Enable zone redundancy on an existing plan for important details about Elastic Premium-specific capacity behavior.

You can only enable availability zones in the plan when you create your app. You can't convert an existing Premium plan to use availability zones.

Create a zone-redundant function app

Follow these steps to create a zone-redundant Premium plan and app.

  1. In the Azure portal, go to the Create Function App page. For more information about creating a function app in the portal, see Create a function app.

  2. Select Functions Premium and then select the Select button.

  3. On the Create Function App (Functions Premium) page, on the Basics tab, enter the settings for your function app. Pay special attention to the settings in the following table (also highlighted in the following screenshot), which have specific requirements for zone redundancy.

    Setting Suggested value Notes for zone redundancy
    Region Your preferred supported region The region in which your Elastic Premium plan is created. You must pick a region that supports availability zones. For a list of regions that support zone redundancy for Azure Functions Premium plans, see Reliability in Azure Functions - Resilience to availability zone failures - Requirements.
    Pricing plan One of the Elastic Premium plans. For more information, see Available instance SKUs. This article describes how to create a zone redundant app in a Premium plan. Zone redundancy isn't currently available in Consumption plans. For information on zone redundancy on App Service plans, see Configure availability zones for App Service.
    Zone redundancy Enabled This setting specifies whether your app is zone redundant. You won't be able to select Enabled unless you have chosen a region that supports zone redundancy, as described previously.

    Screenshot of the Basics tab of the function app create page.

  4. On the Storage tab, enter the settings for your function app storage account. Pay special attention to the setting in the following table, which has specific requirements for zone redundancy.

    Setting Suggested value Notes for zone redundancy
    Storage account A zone-redundant storage account As described in the reliability guide for Azure Functions, we strongly recommend using a zone-redundant storage account for your zone-redundant function app.
  5. For the rest of the function app creation process, create your function app as normal. There are no settings in the rest of the creation process that affect zone redundancy.

After the zone-redundant plan is created and deployed, any function app hosted on your new plan is considered zone-redundant.

Enable zone redundancy on an existing plan

You can enable or disable zone redundancy on existing Elastic Premium plans using the Azure CLI. The zoneRedundant property is mutable for Elastic Premium plans, allowing you to toggle availability zone support without creating a new plan.

Important

Elastic Premium plans capacity behavior differs from Dedicated (App Service) plans. In Elastic Premium, the plan's instance count (sku.capacity) is derived from the app level, not set directly on the plan. Each function app in the plan has a minimumElasticInstanceCount property (always-ready instances), and the control plane automatically sets the plan's sku.capacity to the highest minimumElasticInstanceCount across all apps in the plan.

When enabling zone redundancy, you must update both the plan-level zoneRedundant property to true and sku.capacity to 2 and the app-level minimumElasticInstanceCount to at least 2 on each function app that you want to be zone redundant. Setting in the plan update command alone does not enforce a minimum of 2 instances.

Portal support for toggling availability zone redundancy on existing Elastic Premium plans is not yet available. Use the Azure CLI tab for the current supported workflow.

Verify instance zone placement

After enabling zone redundancy, you can verify that your function app instances are distributed across availability zones.

In the Azure portal, navigate to your function app in the Azure portal. Under Settings, select Instances. The Instances page shows each running instance and the availability zone it's placed in.

Using the Azure CLI, use the following commands to query instance zone placement:

RESOURCE_ID=$(az functionapp show \
  --resource-group <RESOURCE_GROUP> \
  --name <APP_NAME> \
  --query id -o tsv)

az rest \
  --method get \
  --url "${RESOURCE_ID}/instances?api-version=2024-04-01" \
  --query "value[].{machineName:properties.machineName, physicalZone:properties.physicalZone}" \
  -o table

In this example, replace <RESOURCE_GROUP> and <APP_NAME> with the names of your resource group and function app, respectively.

Example output:

MachineName     PhysicalZone
--------------  --------------
pl1sdlwk0002Q7  chinanorth23-az3
pl0sdlwk0002HP  chinanorth23-az1

In the output:

  • machineName is the internal name of the worker instance
  • physicalZone shows the actual availability zone the instance is placed in (format: {region}-az{N})
  • For a zone-redundant plan with 2+ instances, you should see instances distributed across different zones

Next steps