|
| 1 | +--- |
| 2 | +title: Configure App Service plans for zone redundancy |
| 3 | +description: Learn how to configure your App Service plan for zone redundancy. Understand how your App Service plan instances are distributed across availability zones and how to check for zone redundancy support. |
| 4 | +ms.topic: conceptual |
| 5 | +ms.service: azure-app-service |
| 6 | +ms.date: 07/15/2025 |
| 7 | +author: anaharris |
| 8 | +ms.author: anaharris |
| 9 | + |
| 10 | +--- |
| 11 | +# Configure App Service plans for zone redundancy |
| 12 | + |
| 13 | +Azure App Service provides built-in reliability features to help ensure your applications are available and resilient. This article describes how to create your App Service plan with zone redundancy. It also covers how to disable and enable zone redundancy on existing plans, and how to check for zone redundancy support. To learn more about how App Service supports zone redundancy, see [Reliability in Azure App Service](../reliability/reliability-app-service.md). |
| 14 | + |
| 15 | +## Create a new App Service plan with zone redundancy |
| 16 | + |
| 17 | +To create a new App Service plan with zone redundancy: |
| 18 | + |
| 19 | +# [Azure portal](#tab/portal) |
| 20 | + |
| 21 | +Follow the guidance in [Create an App Service plan](../app-service/app-service-plan-manage.md#create-an-app-service-plan). Make sure to select *Enabled* for **Zone redundancy**. |
| 22 | + |
| 23 | +:::image type="content" source="./media/configure-zone-redundancy/app-service-create-zr-plan.png" alt-text="Screenshot of zone redundancy enablement during App Service plan creation in the Azure portal."::: |
| 24 | + |
| 25 | +# [Azure CLI](#tab/azurecli) |
| 26 | + |
| 27 | +Set the `--zone-redundant` argument. You must also specify the `--number-of-workers` argument, which is the number of instances, and set a value greater than or equal to 2. |
| 28 | + |
| 29 | +```azurecli |
| 30 | +az appservice plan create \ |
| 31 | + -n <app-service-plan-name> \ |
| 32 | + -g <resource-group-name> \ |
| 33 | + --zone-redundant \ |
| 34 | + --number-of-workers 2 \ |
| 35 | + --sku P1V3 |
| 36 | +``` |
| 37 | + |
| 38 | +# [Bicep](#tab/bicep) |
| 39 | + |
| 40 | +Set the `zoneRedundant` property to `true`. You must also define the `sku.capacity` property to a value of 2 or greater. If you don't define the `sku.capacity` property, the value defaults to 1. |
| 41 | + |
| 42 | +```bicep |
| 43 | +resource appServicePlan 'Microsoft.Web/serverfarms@2024-11-01' = { |
| 44 | + name: appServicePlanName |
| 45 | + location: location |
| 46 | + sku: { |
| 47 | + name: sku |
| 48 | + capacity: 2 |
| 49 | + } |
| 50 | + kind: 'linux' |
| 51 | + properties: { |
| 52 | + reserved: true |
| 53 | + zoneRedundant: true |
| 54 | + } |
| 55 | +} |
| 56 | +``` |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Set zone redundancy for an existing App Service plan |
| 61 | + |
| 62 | +1. If you want to enable zone redundancy on an existing App Service plan, [check for zone redundancy support for your App Service plan](#check-for-zone-redundancy-support-on-an-app-service-plan). |
| 63 | +1. If your App Service plan supports zone redundancy, you can enable or disable it by using the Azure portal, Azure CLI, or Bicep/Resource Manager. |
| 64 | + |
| 65 | + # [Azure portal](#tab/portal) |
| 66 | + |
| 67 | + 1. In the [Azure portal](https://portal.azure.com), navigate to your App Service plan. |
| 68 | + 1. Select **Settings > Scale out (App Service plan)** in the left navigation pane. |
| 69 | + 1. Select **Zone redundancy** if you wish to enable zone redundancy. Deselect if you wish to disable it. |
| 70 | + |
| 71 | + Changing the zone redundancy status of an App Service plan is almost instantaneous. You don't experience downtime or performance problems during the process. |
| 72 | + |
| 73 | + :::image type="content" source="./media/configure-zone-redundancy/app-service-plan-zone-redundancy-portal.png" alt-text="Screenshot of zone redundancy property for an App Service plan in the Azure portal."::: |
| 74 | + |
| 75 | + > [!IMPORTANT] |
| 76 | + > If you have *Rules Based* scaling enabled, you can't use the Azure portal to enable zone redundancy. You must use the Azure CLI or Bicep/Resource Manager instead. |
| 77 | + |
| 78 | + # [Azure CLI](#tab/azurecli) |
| 79 | + |
| 80 | + - To *enable zone redundancy*, set the `zoneRedundant` property to `true`. You must also specify the `sku.capacity` argument, which is the number of instances, and set a value greater than or equal to 2. |
| 81 | + |
| 82 | + ```azurecli |
| 83 | + az appservice plan update \ |
| 84 | + -n <app-service-plan-name> \ |
| 85 | + -g <resource-group-name> \ |
| 86 | + --set zoneRedundant=true sku.capacity=2 |
| 87 | + ``` |
| 88 | + |
| 89 | + - To *disable zone redundancy*, set the `zoneRedundant` property to `false`. |
| 90 | + |
| 91 | + ```azurecli |
| 92 | + az appservice plan update \ |
| 93 | + -n <app-service-plan-name> \ |
| 94 | + -g <resource-group-name> \ |
| 95 | + --set zoneRedundant=false |
| 96 | + ``` |
| 97 | + |
| 98 | + # [Bicep](#tab/bicep) |
| 99 | + |
| 100 | + - To *enable zone redundancy*, set the `zoneRedundant` property to `true`. You must also define the `sku.capacity` property to a value of 2 or greater. If you don't define the `sku.capacity` property, the value defaults to 1. |
| 101 | + |
| 102 | + ```bicep |
| 103 | + resource appServicePlan 'Microsoft.Web/serverfarms@2024-11-01' = { |
| 104 | + name: appServicePlanName |
| 105 | + location: location |
| 106 | + sku: { |
| 107 | + name: sku |
| 108 | + capacity: 2 |
| 109 | + } |
| 110 | + kind: 'linux' |
| 111 | + properties: { |
| 112 | + reserved: true |
| 113 | + zoneRedundant: true |
| 114 | + } |
| 115 | + } |
| 116 | + ``` |
| 117 | + |
| 118 | + - To *disable zone redundancy*, set the `zoneRedundant` property to `false`. |
| 119 | +
|
| 120 | + --- |
| 121 | +
|
| 122 | +## Check for zone redundancy support on an App Service plan |
| 123 | +
|
| 124 | +To see whether an existing App Service plan supports zone redundancy: |
| 125 | +
|
| 126 | +1. Get the maximum number of availability zones that the App Service plan can use by using the Azure portal, Azure CLI, or Bicep/Resource Manager: |
| 127 | +
|
| 128 | + # [Azure portal](#tab/portal) |
| 129 | + |
| 130 | + 1. In the [Azure portal](https://portal.azure.com), navigate to your App Service plan. |
| 131 | + |
| 132 | + 1. Select **Scale out (App Service plan)**. |
| 133 | + |
| 134 | + The maximum number of zones that your App Service plan can use is shown in **Maximum available zones**. |
| 135 | + |
| 136 | + :::image type="content" source="./media/configure-zone-redundancy/app-service-plan-max-zones-portal.png" alt-text="Screenshot of maximum available zones property in the Scale out blade in the Azure portal for an App Service plan."::: |
| 137 | + |
| 138 | + # [Azure CLI](#tab/azurecli) |
| 139 | + |
| 140 | + Query the plan's `maximumNumberOfZones` property: |
| 141 | + |
| 142 | + ```azurecli |
| 143 | + az appservice plan show \ |
| 144 | + -n <app-service-plan-name> \ |
| 145 | + -g <resource-group-name> \ |
| 146 | + --query properties.maximumNumberOfZones |
| 147 | + ``` |
| 148 | + |
| 149 | + # [Bicep](#tab/bicep) |
| 150 | + |
| 151 | + Query the plan's `maximumNumberOfZones` property: |
| 152 | + |
| 153 | + ```bicep |
| 154 | + resource appServicePlan 'Microsoft.Web/serverfarms@2024-11-01' existing = { |
| 155 | + name: '<app-service-plan-name>' |
| 156 | + } |
| 157 | + |
| 158 | + #disable-next-line BCP083 |
| 159 | + output maximumNumberOfZones int = appServicePlan.properties.maximumNumberOfZones |
| 160 | + ``` |
| 161 | + |
| 162 | + --- |
| 163 | + |
| 164 | +1. Compare the number with the following table to determine whether your plan supports zone redundancy: |
| 165 | + |
| 166 | + | Maximum Number of Zones | Zone redundancy support | |
| 167 | + | ------------------------ | ----------------------- | |
| 168 | + | Greater than 1 | Supported | |
| 169 | + | Equal to 1 | Not supported* | |
| 170 | +
|
| 171 | + \* If you're on a plan or a stamp that doesn't support availability zones, you must create a new App Service plan in a new resource group so that you land on the App Service footprint that supports zones. |
| 172 | +
|
| 173 | +## View physical zones for an App Service plan |
| 174 | +
|
| 175 | +When you have a zone-redundant App Service plan, the platform automatically places the instances across [physical availability zone](../reliability/availability-zones-overview.md#physical-and-logical-availability-zones). If you want to verify that your instances are spread across zones, you can check which physical availability zones your plan's instances use by using the Azure portal or Azure CLI: |
| 176 | +
|
| 177 | +# [Azure portal](#tab/portal) |
| 178 | +
|
| 179 | +1. In the [Azure portal](https://portal.azure.com), go to your App Service app. If you have multiple apps in a plan, you can select any app. |
| 180 | + |
| 181 | +1. Select the **Health check** blade. |
| 182 | +
|
| 183 | +1. Select the **Instances** tab to view the physical zone placement for each of your instances. |
| 184 | + |
| 185 | + :::image type="content" source="./media/configure-zone-redundancy/app-service-physical-zones.png" alt-text="Screenshot of the Instances tab in the Health Check blade with the physical zone information in the Azure portal for an App Service app."::: |
| 186 | +
|
| 187 | +# [Azure CLI](#tab/azurecli) |
| 188 | +
|
| 189 | +Use the [REST API](/rest/api/appservice/web-apps/get-instance-info), which returns the `physicalZone` value for each instance in the App Service plan: |
| 190 | +
|
| 191 | +```azurecli |
| 192 | +az rest --method get --url https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/sites/{appName}/instances?api-version=2024-04-01 |
| 193 | +``` |
| 194 | + |
| 195 | +# [Bicep](#tab/bicep) |
| 196 | + |
| 197 | +This operation is not supported in Bicep. Use the Azure CLI or Azure portal instead. |
| 198 | + |
| 199 | +--- |
| 200 | + |
| 201 | +## Related content |
| 202 | +- [Reliability in Azure App Service](../reliability/reliability-app-service.md) |
| 203 | +- [Configure App Service Environment for zone redundancy](../app-service/environment/configure-zone-redundancy-environment.md) |
0 commit comments