Skip to content

Commit e4956c9

Browse files
committed
fixes
1 parent 365371d commit e4956c9

File tree

1 file changed

+71
-69
lines changed

1 file changed

+71
-69
lines changed

articles/azure-functions/migration/migrate-plan-consumption-to-flex.md

Lines changed: 71 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ This article provides step-by-step instructions for migrating your existing func
1616

1717
By migrating your existing serverless apps, your functions can easily take advantage of these benefits of the Flex Consumption plan:
1818

19-
+ Improved scalability
20-
+ Enhanced performance
21-
+ Improved security and networking.
19+
+ Enhanced performance: your apps benefit from faster cold starts and improved scalability.
20+
+ Improved controls: fine-tune your functions with per-function scaling and concurrency settings.
21+
+ Expanded networking: virtual network integration and private endpoint support lets your functions in both public and private networks.
22+
+ Managed identity support: easily connect to remote Azure services using Microsoft Entra ID authentication.
2223

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+
The Flex Consumption plan is the recommended serverless hosting option for your functions going forward. 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).
2425

2526
## Considerations
2627

@@ -63,7 +64,7 @@ Before staring a migration, keep these considerations in mind:
6364
6465
+ The [`jq` tool](https://jqlang.org/download/), which is used to work with JSON output.
6566
66-
#### [Azure portal](#tab/azure-portal)
67+
### [Azure portal](#tab/azure-portal)
6768
6869
+ Access to the [Azure portal]
6970
@@ -364,9 +365,31 @@ The basic steps to change an existing Blob storage trigger to an Event Grid sour
364365

365366
For more information, see [Tutorial: Trigger Azure Functions on blob containers using an event subscription](../functions-event-grid-blob-trigger.md).
366367

367-
### Benchmark your current app performance and costs
368+
### Capture performance benchmarks (optional)
369+
370+
If you plan to validate performance improvement in your app based on the migration to the Flex Consumption plan, you should (optionally) capture the performance benchmarks of your current plan. Then, you can compare them to the same benchmarks for your app running in a Flex Consumption plan for comparison.
371+
372+
>[!TIP]
373+
>Always compare performance under similar conditions, such as time-of-day, day-of-week, and client load. Try to run the two benchmarks as close together as possible.
374+
375+
Here are some benchmarks to consider for your structured performance testing:
376+
377+
| Suggested benchmark | Comment |
378+
| ----- | ----- |
379+
| **Cold-start** | Measure the time from first request to the first response after an idle period. Test with different memory allocation settings in Flex Consumption. |
380+
| **Throughput** | Measure the maximum requests-per-second using [load testing tools](/azure/load-testing/how-to-optimize-azure-functions) to determine how the app handles concurrent requests. |
381+
| **Latency** | Track the `P50`, `P95`, and `P99` response times under various load conditions. You can monitor these metrics in Application Insights. |
382+
383+
You can use this Kusto query to review the suggested latency response times in Application Insights:
384+
385+
```kusto
386+
requests
387+
| where timestamp > ago(1d)
388+
| summarize percentiles(duration, 50, 95, 99) by bin(timestamp, 1h)
389+
| render timechart
390+
```
391+
368392

369-
`<<TODO: recommend performance and cost benchmarks that also apply to Flex apps for comparison post-migration>>`
370393

371394
## Consider dependent services
372395

@@ -410,6 +433,7 @@ You should complete these tasks before you migrate your app to run in a Flex Con
410433
> + [Identify client authentication settings](#identify-client-authentication-settings)
411434
> + [Review inbound access restrictions](#review-inbound-access-restrictions)
412435
> + [Get the code deployment package](#get-the-code-deployment-package)
436+
> + [Capture performance benchmarks](#capture-performance-benchmarks)
413437
414438
### Collect app settings
415439

@@ -670,6 +694,8 @@ The location of your project source files depends on the `WEBSITE_RUN_FROM_PACKA
670694

671695
---
672696

697+
Use these steps to download the deployment package from your current app:
698+
673699
#### [Linux](#tab/linux/azure-cli)
674700

675701
1. Use this [`az functionapp config appsettings list`](/cli/azure/functionapp/config/appsettings#az-functionapp-config-appsettings-list) command to get the `WEBSITE_RUN_FROM_PACKAGE` app setting, if present:
@@ -1369,7 +1395,7 @@ Functions provides several ways to deploy your code, either from the code projec
13691395
>[!TIP]
13701396
>If your project code is maintained in a source code repository, this is the perfect time to configure a continuous deployment pipeline. Continuous deployment lets you automatically deploy application updates based on changes in a connected repository.
13711397
1372-
#### [Continuous code deployment](#tab/continuous-code)
1398+
#### [Continuous code deployment](#tab/continuous)
13731399

13741400
You should update your existing deployment workflows to deploy your source code to your new app:
13751401

@@ -1378,7 +1404,7 @@ You should update your existing deployment workflows to deploy your source code
13781404

13791405
You can also create a new continuous deployment workflow for your new app. For more information, see [Continuous deployment for Azure Functions](../functions-continuous-deployment.md)
13801406

1381-
##### [Ad-hoc code deployment](#tab/ad-hoc-code)
1407+
#### [Ad-hoc code deployment](#tab/ad-hoc)
13821408

13831409
You can use these tools to acheive a one-off deployment of your code project to your new plan:
13841410

@@ -1413,25 +1439,55 @@ If your app hasn't
14131439

14141440
## Post-migration tasks
14151441

1416-
### Verify Basic Functionality
1442+
After a successful migration, you should perform these follow-up tasks:
14171443

1418-
1. Verify the Function App is running on the Flex Consumption plan:
1444+
### Verify basic functionality
14191445

1446+
1. Verify the new app is running in a Flex Consumption plan:
1447+
1448+
#### [Azure CLI](#tab/azure-cli)
1449+
1450+
Use this [`az functionapp show`](/cli/azure/functionapp?view=azure-cli-latest#az-functionapp-show) command two view the details about the hosting plan:
1451+
14201452
```azurecli
1421-
az functionapp show --name <FunctionAppName> --resource-group <ResourceGroupName> --query "serverFarmId"
1453+
az functionapp show --name <APP_NAME> --resource-group <RESOURCE_GROUP> --query "serverFarmId"
14221454
```
1455+
1456+
In this example, replace `<RESOURCE_GROUP>` and `<APP_NAME>` with your resource group and function app names, respectively.
1457+
1458+
#### [Azure portal](#tab/azure-portal)
1459+
1460+
1461+
1462+
---
1463+
1464+
1. Use an HTTP client to call at least one HTTP trigger endpoint on your new app to make sure it responds as expected.
1465+
1466+
1. View the current logs for your new app to verify that requests are
1467+
1468+
Call
14231469
14241470
2. Make sure Application Insights is configured for your function app, then monitor function execution through Application Insights in the Azure Portal through the Application Insights resource or use the App Insights query API.
14251471
1426-
### Enable monitoring
1472+
### Redirect HTTP endpoints
14271473
1428-
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).
1474+
If you haven't already done so, ,
1475+
1476+
2. Validate functionality with test requests
1477+
3. Update DNS or client configuration to point to the new app (if using custom domains)
1478+
4. Consider implementing a temporary redirect from the old app to the new one for any clients still using the old endpoint.
14291479
14301480
14311481
14321482
1483+
### Enable monitoring
1484+
1485+
After a successful migration, make sure that Application Insights in enabled in your new app. 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) in the Flex Consumption plan article.
1486+
14331487
### Capture performance and cost benchmarks
14341488
1489+
1490+
14351491
>[!NOTE]
14361492
>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.
14371493
@@ -1443,12 +1499,6 @@ We recommend waiting at least a few days or even weeks (depending on your applic
14431499
14441500
14451501
1446-
##### [Azure portal](#tab/azure-portal)
1447-
1448-
---
1449-
1450-
1451-
14521502
##### [Azure CLI](#tab/azure-cli)
14531503
14541504
```azurecli
@@ -1467,28 +1517,6 @@ az functionapp delete --name <OriginalFunctionAppName> --resource-group <Resourc
14671517

14681518
> **Warning**: This action will delete your original function app but leaves the Consumption plan intact if other apps are using it. Before deleting, ensure you have successfully migrated all functionality to the new Flex Consumption app, verified no traffic is being directed to the original app, and backed up any relevant logs, configuration, or data that might be needed for reference.
14691519
1470-
### Performance Benchmarking
1471-
1472-
Conduct structured performance testing to compare the migrated app against your original Linux Consumption app:
1473-
1474-
1. **Cold Start Comparison**:
1475-
+ Measure the time from first request to response after idle periods
1476-
+ Test with different memory allocation settings in Flex Consumption
1477-
1478-
2. **Throughput Testing**:
1479-
+ Measure maximum requests per second using [load testing tools](https://learn.microsoft.com/en-us/azure/load-testing/how-to-optimize-azure-functions)
1480-
+ Compare how both plans handle concurrent requests
1481-
1482-
3. **Latency Analysis**:
1483-
+ Track the P50, P95, and P99 response times under various load conditions
1484-
+ Monitor these metrics in Application Insights:
1485-
1486-
```kusto
1487-
requests
1488-
| where timestamp > ago(1d)
1489-
| summarize percentiles(duration, 50, 95, 99) by bin(timestamp, 1h)
1490-
| render timechart
1491-
```
14921520

14931521
### Cost Monitoring
14941522

@@ -1555,17 +1583,6 @@ Despite careful planning, migration issues may occur. Here's how to handle diffe
15551583
| Network connectivity issues | Validate access restrictions and networking settings |
15561584
| Missing application insights | Recreate application insights connection |
15571585
1558-
## Post-migration tasks
1559-
1560-
triggers:
1561-
1562-
HTTP http: Deploy to the new Flex Consumption app
1563-
2. Validate functionality with test requests
1564-
3. Update DNS or client configuration to point to the new app (if using custom domains)
1565-
4. Consider implementing a temporary redirect from the old app to the new one for any clients still using the old endpoint.
1566-
1567-
1568-
15691586
## What to expect after migration
15701587
15711588
After migrating from Linux Consumption to Flex Consumption, you can expect several operational differences:
@@ -1589,28 +1606,13 @@ After migrating from Linux Consumption to Flex Consumption, you can expect sever
15891606
15901607
> **Note**: Actual performance improvements and cost implications can vary based on your specific workload patterns and function app configuration. Monitor performance metrics after migration to optimize your configuration.
15911608
1592-
### Networking Features
1593-
1594-
+ **Enhanced VNet Integration**: Full VNet integration capabilities, allowing access to private endpoints and services.
1595-
+ **Private Endpoint Support**: Support for private endpoints, enabling private access to your function app.
1596-
+ **Network Security Group Support**: More granular network security controls than were available with Linux Consumption.
1597-
15981609
## Conclusion
15991610
16001611
Congratulations on successfully migrating your Azure function app from Linux Consumption to Flex Consumption! This migration represents a significant improvement in your serverless architecture that will benefit both your users and your organization.
16011612
1602-
By completing this migration, you've:
1603-
1604-
+ **Enhanced your application performance** with faster cold starts and improved scalability
1605-
+ **Gained more granular control** over your functions with per-function scaling and concurrency settings
1606-
+ **Improved your networking capabilities** with better VNet integration and private endpoint support
1607-
+ **Positioned your application for future growth** on a modern, actively developed hosting platform
1608-
1609-
Remember to continue monitoring your application in its new environment and fine-tune the settings to optimize cost and performance. The Azure Functions team is continuously evolving the Flex Consumption plan with new features and improvements, so stay informed about new capabilities by regularly checking the [Azure Functions documentation](https://learn.microsoft.com/en-us/azure/azure-functions/).
16101613
1611-
Thank you for following this migration guide. Your investment in modernizing your Azure Functions will pay dividends in improved performance, scalability, and security for your applications.
1614+
Remember to continue monitoring your application in its new environment and fine-tune the settings to optimize cost and performance. The Azure Functions team is continuously evolving the Flex Consumption plan with new features and improvements, so stay informed about new capabilities by regularly checking the [Azure Functions documentation](../azure-functions/).
16121615
1613-
Happy coding!
16141616
16151617
## Providing feedback
16161618

0 commit comments

Comments
 (0)