Skip to content

Commit b265dee

Browse files
committed
add update code + Acrolinx
1 parent 131e703 commit b265dee

File tree

1 file changed

+74
-19
lines changed

1 file changed

+74
-19
lines changed

articles/reliability/reliability-functions.md

Lines changed: 74 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ When zone redundancy is enabled in a Flex Consumption plan, instance spreading i
4242

4343
- [Always-ready](../azure-functions/flex-consumption-plan.md#always-ready-instances) instances are distributed across zones in a round-robin fashion.
4444
- On-demand instances, which are created as a result of event source volumes as the app scales beyond always-ready, are distributed across availability zones on a _best effort_ basis. This means that for on-demand instances, faster scale-out is given preference over even distribution across availability zones. The platform attempts even-out distribution over time.
45-
- To ensure zone resiliency with availability zones, the platform automatically guarantees at least 2 instances of the always-ready type exist for each [per-function scaling function or group](../azure-functions/flex-consumption-plan.md#per-function-scaling), regardless of the always-ready configuration for the app. Any instances created by the platform are platform managed, billed as always-ready instances, and won't change the always-ready configuration settings.
45+
- To ensure zone resiliency with availability zones, the platform automatically guarantees at least two instances of the always-ready type exist for each [per-function scaling function or group](../azure-functions/flex-consumption-plan.md#per-function-scaling), regardless of the always-ready configuration for the app. Any instances created by the platform are platform managed, billed as always-ready instances, and don't change the always-ready configuration settings.
4646
::: zone-end
4747
::: zone pivot="premium-plan"
4848
When you configure Elastic Premium function app plans as zone redundant, the platform automatically spreads the function app instances across the zones in the selected region.
@@ -54,7 +54,7 @@ Instance spreading with a zone-redundant deployment is determined inside the fol
5454
- For a capacity value more than Number of Zones * Number of instances, extra instances are spread across the remaining zones.
5555

5656
>[!IMPORTANT]
57-
>Azure Functions can run on the Azure App Service platform. In the App Service platform, plans that host Premium plan function apps are referred to as Elastic Premium plans, with SKU names like EP1. If you choose to run your function app on a Premium plan, make sure to create a plan with an SKU name that starts with "E", such as EP1. App Service plan SKU names that start with "P", such as P1V2 (Premium V2 Small plan), are actually [Dedicated hosting plans](../azure-functions/dedicated-plan.md). Because they are Dedicated and not Elastic Premium, plans with SKU names starting with "P" won't scale dynamically and may increase your costs.
57+
>Azure Functions can run on the Azure App Service platform. In the App Service platform, plans that host Premium plan function apps are referred to as Elastic Premium plans, with SKU names like `EP1`. If you choose to run your function app on a Premium plan, make sure to create a plan with an SKU name that starts with `E`, such as `EP1`. App Service plan SKU names that start with `P`, such as `P1V2` (Premium V2 Small plan), are [Dedicated hosting plans](../azure-functions/dedicated-plan.md). Because they're Dedicated and not Elastic Premium, plans with SKU names starting with `P` don't scale dynamically and can increase your costs.
5858
::: zone-end
5959
### Regional availability
6060
::: zone pivot="flex-consumption-plan"
@@ -68,7 +68,7 @@ Currently, not all regions support zone redundancy for Flex Consumption plans. Y
6868
6969
The [`az login`](/cli/azure/reference-index#az-login) command signs you into your Azure account.
7070
71-
2. Use this [`az functionapp list-flexconsumption-locations`](/cli/azure/functionapp#az-functionapp-list-flexconsumption-locations) command with the `--zone-redundant=true` option to returns a list of regions that currently support zone-redundant Flex Consumption plans:
71+
2. Use this [`az functionapp list-flexconsumption-locations`](/cli/azure/functionapp#az-functionapp-list-flexconsumption-locations) command with the `--zone-redundant=true` option to return a list of regions that currently support zone-redundant Flex Consumption plans:
7272
7373
```azurecli-interactive
7474
az functionapp list-flexconsumption-locations --zone-redundant=true --query "sort_by(@, &name)[].{Region:name}" -o table
@@ -94,14 +94,14 @@ Zone-redundant Premium plans are available in these regions:
9494
::: zone-end
9595
### Prerequisites
9696
::: zone pivot="flex-consumption-plan"
97-
Availability zone support is a property of the Flex Consumption plan. These are the current considerations for availability zones:
97+
Availability zone support is a property of the Flex Consumption plan. Here are current considerations for using availability zones:
9898
9999
- You can enable availability zones in the plan during app creation. You can also enable or disable this plan feature in an existing app.
100100
- You must use a [zone redundant storage account (ZRS)](../storage/common/storage-redundancy.md#zone-redundant-storage) for your function app's [default host storage account](../azure-functions/storage-considerations.md#storage-account-requirements). If you use a different type of storage account, your app might behave unexpectedly during a zonal outage.
101101
- Must be hosted on a [Flex Consumption](../azure-functions/flex-consumption-plan.md) plan.
102102
::: zone-end
103103
::: zone pivot="premium-plan"
104-
Availability zone support is a property of the Premium plan. These are the current considerations for availability zones:
104+
Availability zone support is a property of the Premium plan. Here are current considerations for availability zones:
105105
106106
- 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.
107107
- You must use a [zone redundant storage account (ZRS)](../storage/common/storage-redundancy.md#zone-redundant-storage) for your function app's [default host storage account](../azure-functions/storage-considerations.md#storage-account-requirements). If you use a different type of storage account, your app might behave unexpectedly during a zonal outage.
@@ -112,10 +112,12 @@ Availability zone support is a property of the Premium plan. These are the curre
112112
::: zone-end
113113
### Pricing
114114
::: zone pivot="flex-consumption-plan"
115-
There's no separate meter associated with enabling availability zones. Pricing for instances used for a zone-redundant Flex Consumption app is the same as a single zone Flex Consumption app. To learn more, see [Billing](../azure-functions/flex-consumption-plan.md#billing). If you enable availability zones but always-ready instance configuration is less than two for each [per-function scaling function or group](../azure-functions/flex-consumption-plan.md#per-function-scaling), the platform automatically creates two instances of the [always-ready](../azure-functions/flex-consumption-plan.md#always-ready-instances) type for each per-function scaling function or group, and those will incur always-ready billing.
115+
There's no separate meter associated with enabling availability zones. Pricing for instances used for a zone-redundant Flex Consumption app is the same as a single zone Flex Consumption app. To learn more, see [Billing](../azure-functions/flex-consumption-plan.md#billing).
116+
117+
When you enable availability zones in an app with always-ready instance configuration of fewer than two instances for each [per-function scaling function or group](../azure-functions/flex-consumption-plan.md#per-function-scaling), the platform automatically creates two more instances of the [always-ready](../azure-functions/flex-consumption-plan.md#always-ready-instances) type for each per-function scaling function or group. These new instances are also billed as always-ready instances.
116118
::: zone-end
117119
::: zone pivot="premium-plan"
118-
There's no extra cost associated with enabling availability zones. Pricing for a zone-redundant Premium App Service plan is the same as a single zone Premium plan. For each App Service plan you use, you're charged based on the SKU you choose, the capacity you specify, and any instances you scale to based on your autoscale criteria. If you enable availability zones but specify a capacity less than three for an App Service plan, the platform enforces a minimum instance count of three for that App Service plan and charges you for those three instances.
120+
There's no extra cost associated with enabling availability zones. Pricing for a zone-redundant Premium App Service plan is the same as a single zone Premium plan. For each App Service plan you use, you're charged based on the SKU you choose, the capacity you specify, and any instances you scale to based on your autoscale criteria. If you enable availability zones on a plan with fewer than three instances, the platform enforces a minimum instance count of three for that App Service plan, and you're charged for all three instances.
119121
::: zone-end
120122
### Create a function app in a zone-redundant plan
121123
::: zone pivot="flex-consumption-plan"
@@ -131,7 +133,7 @@ There are currently multiple ways to deploy a zone-redundant Flex Consumption ap
131133
132134
| Setting | Suggested value | Notes for zone redundancy |
133135
| ------------ | ---------------- | ----------- |
134-
| **Region** | Your preferred supported region | The region under which the new function app is created. You must pick a region that supports availability zones. See the [region availability list](#regional-availability). |
136+
| **Region** | Your preferred supported region | The region in which your function app is created. You must select a region that supports availability zones. See the [region availability list](#regional-availability). |
135137
| **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. |
136138
137139
:::image type="content" source="../azure-functions/media/functions-az-redundancy/azure-functions-flex-basics-az.png" alt-text="Screenshot of the Basics tab of the Flex Consumption function app create page.":::
@@ -222,13 +224,18 @@ After the zone-redundant plan is created and deployed, the Flex Consumption func
222224

223225
### Update a Flex Consumption plan to be zone-redundant
224226

225-
Before updating your Flex Consumption plan to be zone-redundant, consider updating the storage account(s) associated with the app and the deployment storage of the app to also be zone redundant. This will be disruptive and careful consideration should be taken.
226-
- Review [Storage Considerations](../azure-functions/storage-considerations.md).
227-
- Create or identify a zone-redundant storage account to associate with the app.
228-
- Update the storage related application settings of the app, like `AzureWebJobsStorage`, to reference the zone redundant storage account. See [Work with application settings](../azure-functions/functions-how-to-use-azure-function-app-settings.md#use-application-settings).
229-
- Update the deployment storage account for the app, which can be the same or different as the storage account associated with the app. See [Configure deployment settings](../azure-functions/flex-consumption-how-to.md#configure-deployment-settings).
227+
Changing the zone redundancy of you app requires a restart, which causes downtime in your app.
228+
229+
Before updating your Flex Consumption plan to be zone-redundant, you should update the default host storage account to also be zone redundant. If you use a separate storage account for the app's deployment container, should update it to be zone redundant as well.
230+
231+
Use these steps to prepare your storage accounts for the change:
230232

231-
Once the storage account(s) associated with the app have been updated, you can update the Flex Consumption plan to be zone-redundant using Bicep or ARM templates. This will cause the Flex Consumption app in the plan to restart.
233+
1. Review [Storage Considerations](../azure-functions/storage-considerations.md).
234+
1. Create or identify a zone-redundant storage account to associate with the app.
235+
1. Update the storage related application settings of the app, like `AzureWebJobsStorage`, to reference the zone redundant storage account. See [Work with application settings](../azure-functions/functions-how-to-use-azure-function-app-settings.md#use-application-settings).
236+
1. Update the deployment storage account for the app, which can be the same or different as the storage account associated with the app. See [Configure deployment settings](../azure-functions/flex-consumption-how-to.md#configure-deployment-settings).
237+
238+
After the storage accounts used by your app are updated, you can update the Flex Consumption plan to be zone-redundant using Bicep or ARM templates. The Azure portal and Azure CLI don't currently support making zone redundancy updates to the plan.
232239

233240
#### [Azure portal](#tab/azure-portal)
234241
Not currently supported.
@@ -247,17 +254,65 @@ Not currently supported.
247254
-->
248255
#### [Bicep template](#tab/bicep)
249256

250-
Follow the same instructions as in [Create a zone-redundant Flex Consumption app](#create-a-zone-redundant-flex-consumption-plan) to add the `zoneRedundant` property to the plan definition.
257+
You can use this Bicep file to add the `zoneRedundant` property to `true` in an existing plan definition:
258+
259+
```bicep
260+
resource existingServerFarm 'Microsoft.Web/serverfarms@2024-04-01' existing = {
261+
name: '<YOUR_PLAN_NAME>'
262+
scope: resourceGroup()
263+
}
264+
265+
resource updatedServerFarm 'Microsoft.Web/serverfarms@2024-04-01' = {
266+
name: existingServerFarm.name
267+
location: '<YOUR_REGION_NAME>'
268+
kind: 'functionapp'
269+
sku: {
270+
tier: 'FlexConsumption'
271+
name: 'FC1'
272+
}
273+
properties: {
274+
reserved: true
275+
zoneRedundant: true // Enables zone redundancy
276+
}
277+
}
278+
```
279+
280+
In this file, replace `<YOUR_PLAN_NAME>` and `<YOUR_REGION_NAME>` with the name of your plan and region, respectively. To learn how to deploy a Bicep file, see [Deploy your template](../azure-functions/functions-infrastructure-as-code.md#deploy-your-template).
251281

252282
#### [ARM template](#tab/arm-template)
253-
Follow the same instructions as in [Create a zone-redundant Flex Consumption app](#create-a-zone-redundant-flex-consumption-plan) to add the `zoneRedundant` property to the plan definition.
283+
284+
You can use this ARM template fragment to set the `zoneRedundant` property to `true` in an existing plan definition:
285+
286+
```json
287+
{
288+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
289+
"contentVersion": "1.0.0.0",
290+
"resources": [
291+
{
292+
"type": "Microsoft.Web/serverfarms",
293+
"apiVersion": "2024-04-01",
294+
"name": "<YOUR_PLAN_NAME>",
295+
"location": "<YOUR_REGION_NAME>",
296+
"kind": "functionapp",
297+
"sku": {
298+
"tier": "FlexConsumption",
299+
"name": "FC1"
300+
},
301+
"properties": {
302+
"reserved": true,
303+
"zoneRedundant": true
304+
}
305+
}
306+
]
307+
}
308+
```
309+
310+
In this template, replace `<YOUR_PLAN_NAME>` and `<YOUR_REGION_NAME>` with the name of your plan and region, respectively. To learn how to deploy an ARM template, see [Deploy your template](../azure-functions/functions-infrastructure-as-code.md#deploy-your-template).
254311

255312
---
256-
313+
257314
::: zone-end
258315
::: zone pivot="premium-plan"
259-
### Create a zone-redundant Premium plan and function app
260-
261316
There are currently two ways to deploy a zone-redundant Premium plan and function app. You can use either the [Azure portal](https://portal.azure.com) or an ARM template.
262317

263318
#### [Azure portal](#tab/azure-portal)

0 commit comments

Comments
 (0)