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.

Note

The content in this article isn't relevant to the currently selected hosting plan. To choose a different plan, use the selector at the top of this article. For a comparison of all hosting plans, see Azure Functions hosting options.

Zone redundancy isn't supported in the Consumption plan. Consider migrating to the Premium plan for availability zone support.

Note

The content in this article isn't relevant to the currently selected hosting plan. To choose a different plan, use the selector at the top of this article. For a comparison of all hosting plans, see Azure Functions hosting options.

For Dedicated (App Service) plan zone redundancy configuration, see Configure availability zones for App Service.

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. For more information, including important details about Elastic Premium-specific capacity behaviors, see Enable zone redundancy on an existing plan.

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 Create Function App. For more information about creating a function app in the portal, see Create a function app.

  2. Select Functions Premium and then select Select.

  3. On Create Function App (Functions Premium), 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 you create your Elastic Premium plan. 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 can't select Enabled unless you choose 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, use 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 you create and deploy the zone-redundant plan, any function app you host on your new plan is considered zone-redundant.

Enable zone redundancy on an existing plan

Keep these important considerations in mind before you enable zone redundancy in your Premium plan hosted app:

  • The zoneRedundant property of an Elastic Premium plan is mutable, so you can toggle availability zone support without creating a new plan.

  • Unlike in a Dedicated (App Service) plan, an Elastic Premium capacity behavior (sku.capacity) for each app is derived from app-level settings not just the plan setting.

  • To enable zone redundancy, you must update settings at both the plan level and the app level:

    Level Property Required value Notes
    Plan zoneRedundant true Enables availability zone distribution
    Plan sku.capacity 2 or higher Sets the intended minimum instance count
    App (each) minimumElasticInstanceCount 2 or higher The control plane sets plan sku.capacity to the highest value across all apps. Setting sku.capacity alone doesn't enforce a minimum, so you must also set this app-level property.
  • You can't currently configure availability zone redundancy on existing Elastic Premium plans from the portal.

To enable availability zone redundancy in your Premium plan app:

Not currently supported, choose another tab.

Verify instance zone placement

After you enable zone redundancy, you can confirm that your function app instances are distributed across availability zones by using either the Azure portal or Azure CLI.

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

Troubleshooting

If zone redundancy isn't working as expected after following these steps, check the following items:

  • Verify the region supports availability zones for your plan type. See Reliability in Azure Functions - Requirements.

  • Ensure your storage account uses a zone-redundant SKU (ZRS or GZRS).

  • Confirm that minimumElasticInstanceCount is set to at least 2 on each app.

  • For issues related to scale units and SKU requirements, review the Common Issues and Solutions section in the deep dive blog post on Availability Zones in Azure App Service.

Next steps