You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/flex-consumption-how-to.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -693,7 +693,6 @@ az monitor metrics list --resource <ResourceId> --metric "InstanceCount" --inter
693
693
az monitor metrics list --resource <ResourceId> --metric "CpuPercentage" --interval PT1H --output table
694
694
```
695
695
696
-
> **Note**: Flex Consumption metrics are different from Linux Consumption metrics. When comparing performance before and after migration, keep in mind that you'll need to use different metrics to track similar performance characteristics.
697
696
698
697
##### [Azure portal](#tab/azure-portal)
699
698
@@ -733,6 +732,10 @@ az monitor metrics list --resource <ResourceId> --metric "CpuPercentage" --inter
#customer intent: As a developer, I want to learn how to migrate my existing serverless applications in Azure Functions from the Consumption host plan to the Flex Consumption hosting plan.
This article provides step-by-step instructions for migrating your existing function apps hosted in the [Consumption plan](../consumption-plan.md) in Azure Functions to instead use the [Flex Consumption plan](../flex-consumption-plan.md).
17
16
17
+
By migrating your existing serverless apps, your functions can easily take advantage of these benefits of the Flex Consumption plan:
18
+
19
+
+ Improved scalability
20
+
+ Enhanced performance
21
+
+ Improved security and networking.
22
+
23
+
For more information, see [Flex Consumption plan benefits](../flex-consumption-plan.md#benefits). For a detailed comparison between hosting plans, see [Azure Functions hosting options](../functions-scale.md).
24
+
18
25
## Considerations
19
26
20
-
+ Due to the significant configuration and behavior differences between the two plans, you aren't able to simply _shift_ an existing Consumption plan app to the Flex Consumption plan. The migration process instead has you create a new Flex Consumption plan app that is equivalent to your current app and running in the same resource group and with the same dependencies.
27
+
Before staring a migration, keep these considerations in mind:
21
28
22
-
+By migrating your existing serverless apps, your functions can take advantage of the benefits of the Flex Consumption plan, such as improved scalability, enhanced performance, and improved security and networking. For more information about, see [Flex Consumption plan benefits](../flex-consumption-plan.md#benefits). For a detailed comparison between hosting plans, see [Azure Functions hosting options](../functions-scale.md).
29
+
+Due to the significant configuration and behavior differences between the two plans, you aren't able to simply _shift_ an existing Consumption plan app to the Flex Consumption plan. The migration process instead has you create a new Flex Consumption plan app that is equivalent to your current app and running in the same resource group and with the same dependencies.
23
30
24
31
+ You should prioritize the migration of your apps that run in a Consumption plan on Linux.
25
32
26
-
+ This article assumes that you have a general understanding of Functions concepts and architectures and are familiar with features of any apps being migrated, such as triggers and bindings, authentication, and any networking customizations.
33
+
+ This article assumes that you have a general understanding of Functions concepts and architectures and are familiar with features of your apps being migrated. Such concepts include triggers and bindings, authentication, and networking customization.
27
34
28
35
+ Where possible, this article is targeted to a specific language runtime stack. Make sure to choose your app's language at the top of the article.
29
36
@@ -48,7 +55,7 @@ This article provides step-by-step instructions for migrating your existing func
48
55
49
56
+[Azure CLI](/cli/azure), version v2.71.0, or a later version. Scripts are testing using Azure CLI in [Azure Cloud Shell](/azure/cloud-shell/overview).
50
57
51
-
+ The [resource-graph](https://learn.microsoft.com/en-us/azure/governance/resource-graph/first-query-azurecli) extension, which you can install by using the [`az extension add`](/cli/azure/extension#az-extension-add) command:
58
+
+ The [resource-graph](../../governance/resource-graph/first-query-azurecli.md) extension, which you can install by using the [`az extension add`](/cli/azure/extension#az-extension-add) command:
52
59
53
60
```azurecli
54
61
az extension add --name resource-graph
@@ -117,10 +124,10 @@ az graph query -q "resources | where subscriptionId == '$(az account show --quer
117
124
--query data --output table
118
125
```
119
126
120
-
This command generates a table with the app name, location, and resource group for all Consumption apps running on Windows in the current subscription.
121
-
122
127
---
123
128
129
+
This command generates a table with the app name, location, and resource group for all Consumption apps running on Windows in the current subscription.
130
+
124
131
You're promoted to install the [resource-graph extension](/cli/azure/graph), if it isn't already installed.
125
132
126
133
#### [Azure portal](#tab/azure-portal)
@@ -152,6 +159,8 @@ You're promoted to install the [resource-graph extension](/cli/azure/graph), if
152
159
| project name, location, resourceGroup
153
160
```
154
161
162
+
---
163
+
155
164
This command generates a table with the app name, location, and resource group for all Consumption apps running on Windows in the current subscription.
156
165
157
166
---
@@ -215,33 +224,22 @@ The Flex Consupmtion plan doesn't currently support all of the language stack ve
215
224
216
225
Use this [`az functionapp list-flexconsumption-runtimes`](/cli/azure/functionapp#az-functionapp-list-flexconsumption-runtimes) command to verify Flex Consumption plan support for your language stack version in a specific region:
In this example, replace `<REGION>` with your current region. This command displays all versions of the specified language stack supported by the Flex Consumption plan in your region.
231
+
In this example, replace `<REGION>` with your current region and `<LANGUAGE_STACK>` with one of these vaules:
@@ -831,10 +829,10 @@ Before deploying your code, you must configure the new app with the relevant Fle
831
829
832
830
Run this script that performs these tasks:
833
831
834
-
1. Gets app settings from the old app, ignoring settings that don't apply in a Flex Consumption plan or that already exist in the new app.
835
-
1. Writes the collected settings locally to a temporary file.
836
-
1. Applies settings from the file to your new app.
837
-
1. Deletes the temporary file.
832
+
1. Gets app settings from the old app, ignoring settings that don't apply in a Flex Consumption plan or that already exist in the new app.
833
+
1. Writes the collected settings locally to a temporary file.
834
+
1. Applies settings from the file to your new app.
835
+
1. Deletes the temporary file.
838
836
839
837
```azurecli
840
838
sourceAppName=<SOURCE_APP_NAME>
@@ -1414,10 +1412,14 @@ If your app hasn't
1414
1412
1415
1413
After migrating to Flex Consumption, implement a structured monitoring approach to ensure optimal performance and detect any issues. For more information, see [Configure monitoring](../flex-consumption-how-to.md#configure-monitoring).
1416
1414
1417
-
### Capture performance and cost benchmarks
1418
1415
1419
1416
1420
1417
1418
+
### Capture performance and cost benchmarks
1419
+
1420
+
>[!NOTE]
1421
+
>Flex Consumption plan metrics differ from Consumption plan metrics. When comparing performance before and after migration, keep in mind that you must use different metrics to track similar performance characteristics.
1422
+
1421
1423
### Shut down the original app (optional)
1422
1424
1423
1425
After thoroughly testing your new Flex Consumption function app and validating that everything is working as expected, you may want to clean up resources to avoid unnecessary costs. This should only be done once you're completely confident that the migration has been successful and all functionality has been verified over a sufficient period.
@@ -1595,6 +1597,10 @@ Thank you for following this migration guide. Your investment in modernizing you
1595
1597
1596
1598
Happy coding!
1597
1599
1600
+
## Providing feedback
1601
+
1602
+
If you encounter issues with your migration using this article or want to provide other feedback on this guidance, please use this Microsoft Q&A question to provide your feedback: `<<QUESTION>>`
1603
+
1598
1604
## Related articles
1599
1605
1600
1606
+ [Flex Consumption plan overview](../flex-consumption-plan.md)
0 commit comments