Skip to content

Commit 4da7b9d

Browse files
authored
Merge pull request #298985 from MicrosoftDocs/main
4/28/2025 PM Publish
2 parents 11690de + 7f514c0 commit 4da7b9d

File tree

161 files changed

+1075
-811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+1075
-811
lines changed

articles/app-service/manage-automatic-scaling.md

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to scale automatically in Azure App Service with no confi
44
author: msangapu-msft
55
ms.author: msangapu
66
ms.topic: how-to
7-
ms.date: 03/01/2024
7+
ms.date: 04/18/2025
88
ms.custom: devx-track-azurecli
99

1010
---
@@ -15,18 +15,20 @@ ms.custom: devx-track-azurecli
1515
> Automatic scaling is available for all app types: Windows and Linux (deploy as code and container). Automatic scaling isn't supported for deployment slot traffic.
1616
>
1717
18-
Automatic scaling is a new scale-out option that automatically handles scaling decisions for your web apps and App Service plans. It's different from the preexisting **[Azure autoscale](/azure/azure-monitor/autoscale/autoscale-overview)**, which lets you define scaling rules based on schedules and resources. With automatic scaling, you can adjust scaling settings to improve your app's performance and avoid cold start issues. The platform prewarms instances to act as a buffer when scaling out, ensuring smooth performance transitions. You're charged per second for every instance, including prewarmed instances.
18+
Automatic scaling is a scale-out option that automatically handles scaling decisions for your web apps and App Service plans. It's different from **[Azure autoscale](/azure/azure-monitor/autoscale/autoscale-overview)**, which lets you define scaling rules based on schedules and resources.
19+
20+
With automatic scaling, you can adjust scaling settings to improve your app's performance and avoid cold start issues. The platform prewarms instances to act as a buffer when scaling out, ensuring smooth performance transitions. You're charged per second for every instance, including prewarmed instances.
1921

2022
The following table compares scale-out and scale-in options available on App Service:
2123

2224
| | **Manual** | **Autoscale** | **Automatic scaling** |
2325
| --- | --- | --- | --- |
24-
| Available pricing tiers | Basic and up. | Standard and up. | Premium V2 (P1V2, P2V2 and P3V2) pricing tiers. Premium V3 (P0V3, P1V3, P2V3, P3V3, P1MV3, P2MV3, P3MV3, P4MV3 and P5MV3) pricing tiers.|
25-
|Rule-based scaling |No. |Yes |No, the platform manages out the scale and scale in based on HTTP traffic. |
26-
|Schedule-based scaling |No. |Yes. |No.|
27-
|Always-ready instances | No, your web app runs on the number of manually scaled instances. | No, your web app runs on other instances available during the scale-out operation, based on the threshold defined for autoscale rules. | Yes (minimum 1). |
28-
|Prewarmed instances |No. |No. |Yes (default 1). |
29-
|Per-app maximum |No. |No. |Yes.|
26+
| Available pricing tiers | Basic and up | Standard and up | Premium V2 (P1V2, P2V2, and P3V2) pricing tiers. Premium V3 (P0V3, P1V3, P2V3, P3V3, P1MV3, P2MV3, P3MV3, P4MV3, and P5MV3) pricing tiers.|
27+
|Rule-based scaling |No |Yes |No, the platform manages the scale-out and scale-in based on HTTP traffic. |
28+
|Schedule-based scaling |No |Yes |No |
29+
|Always-ready instances | No, your web app runs on the number of manually scaled instances. | No, your web app runs on other instances available during the scale-out operation, based on the threshold defined for autoscale rules. | Yes (minimum 1) |
30+
|Prewarmed instances |No |No |Yes (default 1) |
31+
|Per-app maximum |No |No |Yes |
3032

3133
## How automatic scaling works
3234

@@ -40,11 +42,11 @@ Here are a few scenarios where you should scale out automatically:
4042

4143
## Enable automatic scaling
4244

43-
The **Maximum burst** level represents the highest number of instances that your App Service plan can increase to based on incoming HTTP requests. For Premium v2 & v3 plans, you can set **Maximum burst** to up to 30 instances. The **Maximum burst** number must be equal to or greater than the number of workers specified for the App Service plan.
45+
The **Maximum burst** setting represents the highest number of instances that your App Service plan can increase to based on incoming HTTP requests. For Premium v2 & v3 plans, you can specify up to 30 instances. The maximum burst number must be equal to or greater than the number of workers specified for the App Service plan.
4446

4547
#### [Azure portal](#tab/azure-portal)
4648

47-
To enable automatic scaling, go to the web app's left menu and select **scale-out (App Service Plan)**. Select **Automatic**, update the **Maximum burst** value, and select the **Save** button.
49+
To enable automatic scaling, go to the web app's left menu. Under **Settings**, select **Scale-out (App Service plan)**. Select **Automatic**, update the **Maximum burst** value, and select the **Save** button.
4850

4951
:::image type="content" source="./media/manage-automatic-scaling/azure-portal-automatic-scaling.png" alt-text="Screenshot that shows automatic scaling in Azure portal" :::
5052

@@ -57,7 +59,7 @@ az appservice plan update --name <APP_SERVICE_PLAN> --resource-group <RESOURCE_G
5759
```
5860

5961
>[!NOTE]
60-
> If you receive the error message "Operation returned an invalid status 'Bad Request'," try using a different resource group or create a new one.
62+
> If you receive the error message `Operation returned an invalid status 'Bad Request'`, try using a different resource group or create a new one.
6163
>
6264
6365
---
@@ -68,11 +70,14 @@ The app-level setting **Always ready instances** specifies the minimum number of
6870

6971
#### [Azure portal](#tab/azure-portal)
7072

71-
To set the minimum number of web app instances, go to the web app's left menu and select **scale-out (App Service Plan)**. Update the **Always ready instances** value, and select the **Save** button.
73+
To set the minimum number of web app instances, go to the web app's left menu and select **Scale-out (App Service plan)**. Update the **Always ready instances** value, and select the **Save** button.
7274

7375
:::image type="content" source="./media/manage-automatic-scaling/azure-portal-always-ready-instances.png" alt-text="Screenshot of always-ready instances." :::
7476

7577
#### [Azure CLI](#tab/azure-cli)
78+
79+
To set the minimum number of web app instances, use the following command:
80+
7681
```azurecli-interactive
7782
az webapp update --resource-group <RESOURCE_GROUP> --name <APP_NAME> --minimum-elastic-instance-count <ALWAYS_READY_COUNT>
7883
```
@@ -81,11 +86,11 @@ To set the minimum number of web app instances, go to the web app's left menu an
8186

8287
## Set the maximum number of web app instances
8388

84-
The **Maximum scale limit** value sets the maximum number of instances a web app can scale to. The **Maximum scale limit** is helpful when a downstream component like a database has limited throughput. The per-app maximum can be between 1 and the **Maximum burst**.
89+
The **Maximum scale limit** value sets the maximum number of instances a web app can scale to. The **Maximum scale limit** is helpful when a downstream component like a database has limited throughput. The per-app maximum can be between 1 and the maximum burst value.
8590

8691
#### [Azure portal](#tab/azure-portal)
8792

88-
To set the maximum number of web app instances, go to the web app's left menu and select **scale-out (App Service Plan)**. Select **Enforce scale-out limit**, update the **Maximum scale limit**, and select the **Save** button.
93+
To set the maximum number of web app instances, go to the web app's left menu and select **Scale-out (App Service plan)**. Select **Enforce scale-out limit**, update the **Maximum scale limit**, and select the **Save** button.
8994

9095
:::image type="content" source="./media/manage-automatic-scaling/azure-portal-maximum-scale-limit.png" alt-text="Screenshot of maximum scale limit." :::
9196

@@ -97,7 +102,7 @@ Currently, you can't change the **Maximum scale limit** in the Azure CLI. You mu
97102

98103
## Update prewarmed instances
99104

100-
The **prewarmed instance** setting provides warmed instances as a buffer during HTTP scale and activation events. Prewarmed instances continue to buffer until the maximum scale-out limit is reached. The default **prewarmed instance** count is 1 and, for most scenarios, this value should remain as 1.
105+
The prewarmed instance setting provides warmed instances as a buffer during HTTP scale and activation events. Prewarmed instances continue to buffer until the maximum scale-out limit is reached. The default prewarmed instance count is *1* and, for most scenarios, this value should remain as 1.
101106

102107
#### [Azure portal](#tab/azure-portal)
103108

@@ -117,7 +122,7 @@ You can modify the number of prewarmed instances for an app by using the Azure C
117122

118123
#### [Azure portal](#tab/azure-portal)
119124

120-
To disable automatic scaling, go to the web app's left menu and select **scale-out (App Service Plan)**. Select **Manual** and select the **Save** button.
125+
To disable automatic scaling, go to the web app's left menu and select **Scale-out (App Service plan)**. Select **Manual** and select the **Save** button.
121126

122127
:::image type="content" source="./media/manage-automatic-scaling/azure-portal-manual-scaling.png" alt-text="Screenshot of manual scaling." :::
123128

@@ -141,6 +146,7 @@ No, you can only have Azure App Service web apps in the App Service plan in whic
141146
>
142147
143148
### How does automatic scaling work behind the scenes?
149+
144150
Applications set to automatically scale are continuously monitored, with worker health assessments occurring at least once every few seconds. If the system detects increased load on the application, health checks become more frequent. If worker health deteriorates and requests slow down, other instances are requested. The speed at which instances are added varies based on the individual application's load pattern and startup time. Applications with brief startup times and intermittent bursts of load might see one virtual machine added every few seconds to a minute.
145151

146152
Once the load subsides, the platform initiates a review for potential scaling in. This process typically begins about 5-10 minutes after the load stops increasing. During scaling in, instances are removed at a maximum rate of one every few seconds to a minute.
@@ -168,11 +174,12 @@ If your web app returns a 5xx status, these endpoint pings might result in inter
168174
### How do I track the number of scaled-out instances during the automatic scaling event?
169175

170176
The `AutomaticScalingInstanceCount` metric reports the number of virtual machines on which the app is running, including the prewarmed instance if it's deployed. This metric can also be used to track the maximum number of instances your web app scaled out during an automatic scaling event. This metric is available only for the apps that have **Automatic Scaling** enabled.
177+
171178
### How does ARR Affinity affect automatic scaling?
172179

173180
Azure App Service uses Application Request Routing cookies known as an ARR Affinity. ARR Affinity cookies restrict scaling because they send requests only to servers associated with the cookie, rather than any available instance. For apps that store state, it's better to scale up (increase resources on a single instance). For stateless apps, scaling out (adding more instances) offers more flexibility and scalability. ARR Affinity cookies are enabled by default on App Service. Depending on your application needs, you might choose to disable ARR affinity cookies when using automatic scaling.
174181

175-
To disable ARR Affinity cookies: select your App Service app, and under **Settings**, select **Configuration**. Next select the **General settings** tab. Under **ARR affinity**, select **Off** and then select the **Save** button.
182+
To disable ARR Affinity cookies: select your App Service app, and under **Settings**, select **Configuration**. Next select the **General settings** tab. Under **Session affinity**, select **Off** and then select the **Save** button.
176183

177184
<a name="Related content"></a>
178185

9.45 KB
Loading
-6.45 KB
Loading

articles/app-service/monitor-app-service.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Monitor Azure App Service
3-
description: Start here to learn how to monitor Azure App Service.
4-
ms.date: 03/05/2024
3+
description: Learn about options in Azure App Service for monitoring resources for availability, performance, and operation.
4+
ms.date: 04/18/2025
55
ms.custom: horz-monitor
66
ms.topic: conceptual
77
author: msangapu-msft
@@ -15,7 +15,7 @@ ms.service: azure-app-service
1515

1616
## App Service monitoring
1717

18-
Azure App Service provides several monitoring options for monitoring resources for availability, performance, and operation. Options include Diagnostic Settings, Application Insights, log stream, metrics, quotas and alerts, and activity logs.
18+
Azure App Service provides several options for monitoring resources for availability, performance, and operation. Options include diagnostic settings, Application Insights, log stream, metrics, quotas and alerts, and activity logs.
1919

2020
On the Azure portal page for your web app, you can select **Diagnose and solve problems** from the left navigation to access complete App Service diagnostics for your app. For more information about the App Service diagnostics tool, see [Azure App Service diagnostics overview](overview-diagnostics.md).
2121

@@ -55,7 +55,7 @@ For more information about the resource types for App Service, see [App Service
5555
[!INCLUDE [horz-monitor-platform-metrics](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-platform-metrics.md)]
5656
For a list of available metrics for App Service, see [App Service monitoring data reference](monitor-app-service-reference.md#metrics).
5757

58-
For help understanding metrics in App Service, see [Understand metrics](web-sites-monitor.md#understand-metrics). Metrics can be viewed by aggregates on data (ie. average, max, min, etc.), instances, time range, and other filters. Metrics can monitor performance, memory, CPU, and other attributes.
58+
For help understanding metrics in App Service, see [Metrics](web-sites-monitor.md#understand-metrics). Metrics can be viewed by aggregates on data (such as average, max, min), instances, time range, and other filters. Metrics can monitor performance, memory, CPU, and other attributes.
5959

6060
[!INCLUDE [horz-monitor-resource-logs](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-resource-logs.md)]
6161
For the available resource log categories, their associated Log Analytics tables, and the logs schemas for App Service, see [App Service monitoring data reference](monitor-app-service-reference.md#resource-logs).
@@ -69,7 +69,7 @@ For the available resource log categories, their associated Log Analytics tables
6969

7070
Azure activity logs for App Service include details such as:
7171

72-
- What operations were taken on the resources (ex: App Service Plans)
72+
- What operations were taken on the resources (for example, App Service plans)
7373
- Who started the operation
7474
- When the operation occurred
7575
- Status of the operation
@@ -130,7 +130,7 @@ See [Azure Monitor queries for App Service](https://github.com/microsoft/AzureMo
130130

131131
### Quotas and alerts
132132

133-
Apps that are hosted in App Service are subject to certain limits on the resources they can use. [The limits](web-sites-monitor.md#understand-quotas) are defined by the App Service plan that's associated with the app. Metrics for an app or an App Service plan can be hooked up to alerts.
133+
Apps that are hosted in App Service are subject to certain limits on the resources they can use. The limits are defined by the App Service plan that's associated with the app. Metrics for an app or an App Service plan can be hooked up to alerts. To learn more, see [Quotas](web-sites-monitor.md#understand-quotas).
134134

135135
### App Service alert rules
136136

@@ -140,15 +140,15 @@ The following table lists common and recommended alert rules for App Service.
140140
|:---|:---|:---|
141141
| Metric | Average connections| When number of connections exceed a set value|
142142
| Metric | HTTP 404| When HTTP 404 responses exceed a set value|
143-
| Metric | HTTP Server Errors| When HTTP 5xx errors exceed a set value|
144-
| Activity Log | Create or Update Web App | When app is created or updated|
145-
| Activity Log | Delete Web App | When app is deleted|
146-
| Activity Log | Restart Web App| When app is restarted|
147-
| Activity Log | Stop Web App| When app is stopped|
143+
| Metric | HTTP server errors| When HTTP 5xx errors exceed a set value|
144+
| Activity log | Create or update web app | When app is created or updated|
145+
| Activity log | Delete web app | When app is deleted|
146+
| Activity log | Restart web app| When app is restarted|
147+
| Activity log | Stop web app| When app is stopped|
148148

149149
[!INCLUDE [horz-monitor-advisor-recommendations](~/reusable-content/ce-skilling/azure/includes/azure-monitor/horizontals/horz-monitor-advisor-recommendations.md)]
150150

151151
## Related content
152152

153-
- See [App Service monitoring data reference](monitor-app-service-reference.md) for a reference of the metrics, logs, and other important values created for App Service.
154-
- See [Monitoring Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource) for general details on monitoring Azure resources.
153+
- [Azure App Service monitoring data reference](monitor-app-service-reference.md)
154+
- [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource)

0 commit comments

Comments
 (0)