Skip to content

Commit db82e98

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into rolyon-rbac-classic-admins-deprecation-update
2 parents 63601b6 + 53e032f commit db82e98

File tree

435 files changed

+3614
-2293
lines changed

Some content is hidden

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

435 files changed

+3614
-2293
lines changed

.openpublishing.publish.config.json

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,42 @@
200200
"branch": "master",
201201
"branch_mapping": {}
202202
},
203+
{
204+
"path_to_root": "functions-quickstart-dotnet-azd",
205+
"url": "https://github.com/Azure-Samples/functions-quickstart-dotnet-azd",
206+
"branch": "main",
207+
"branch_mapping": {}
208+
},
209+
{
210+
"path_to_root": "functions-quickstart-java-azd",
211+
"url": "https://github.com/Azure-Samples/azure-functions-java-flex-consumption-azd",
212+
"branch": "main",
213+
"branch_mapping": {}
214+
},
215+
{
216+
"path_to_root": "functions-quickstart-python-azd",
217+
"url": "https://github.com/Azure-Samples/functions-quickstart-python-http-azd",
218+
"branch": "main",
219+
"branch_mapping": {}
220+
},
221+
{
222+
"path_to_root": "functions-quickstart-powershell-azd",
223+
"url": "https://github.com/Azure-Samples/functions-quickstart-powershell-azd",
224+
"branch": "main",
225+
"branch_mapping": {}
226+
},
227+
{
228+
"path_to_root": "functions-quickstart-javascript-azd",
229+
"url": "https://github.com/Azure-Samples/functions-quickstart-javascript-azd",
230+
"branch": "main",
231+
"branch_mapping": {}
232+
},
233+
{
234+
"path_to_root": "functions-quickstart-typescript-azd",
235+
"url": "https://github.com/Azure-Samples/functions-quickstart-typescript-azd",
236+
"branch": "main",
237+
"branch_mapping": {}
238+
},
203239
{
204240
"path_to_root": "azure-functions-templates-v3",
205241
"url": "https://github.com/Azure/azure-functions-templates",
@@ -560,6 +596,12 @@
560596
"branch": "main",
561597
"branch_mapping": {}
562598
},
599+
{
600+
"path_to_root": "msdocs-spring-boot-mongodb-sample-app",
601+
"url": "https://github.com/Azure-Samples/msdocs-spring-boot-mongodb-sample-app",
602+
"branch": "main",
603+
"branch_mapping": {}
604+
},
563605
{
564606
"path_to_root": "msdocs-tomcat-mysql-sample-app",
565607
"url": "https://github.com/Azure-Samples/msdocs-tomcat-mysql-sample-app",
@@ -857,4 +899,4 @@
857899
"articles/virtual-network/.openpublishing.redirection.virtual-network.json",
858900
"articles/vpn-gateway/.openpublishing.redirection.vpn-gateway.json"
859901
]
860-
}
902+
}

.openpublishing.redirection.azure-resource-manager.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2009,6 +2009,11 @@
20092009
"source_path_from_root": "/articles/azure-resource-manager/bicep/bicep-extensibility-kubernetes-provider.md",
20102010
"redirect_url": "/azure/azure-resource-manager/bicep/bicep-kubernetes-extension",
20112011
"redirect_document_id": false
2012-
}
2012+
},
2013+
{
2014+
"source_path_from_root": "/articles/azure-resource-manager/bicep/tutorial-use-deployment-stacks.md",
2015+
"redirect_url": "/training/modules/manage-resource-lifecycles-deployment-stacks",
2016+
"redirect_document_id": false
2017+
}
20132018
]
20142019
}

.openpublishing.redirection.iot-develop.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@
350350
"redirect_url": "/azure/iot/concepts-model-parser",
351351
"redirect_document_id": false
352352
},
353+
{
354+
"source_path_from_root": "/articles/iot/concepts-model-parser.md",
355+
"redirect_url": "/azure/iot/concepts-modeling-guide",
356+
"redirect_document_id": false
357+
},
353358
{
354359
"source_path_from_root": "/articles/iot-pnp/concepts-model-repository.md",
355360
"redirect_url": "/azure/iot/concepts-model-discovery",
Lines changed: 83 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,153 @@
11
---
2-
title: Capacity of an Azure API Management instance | Microsoft Docs
3-
description: This article explains what the capacity metric is and how to make informed decisions whether to scale an Azure API Management instance.
2+
title: Capacity metrics - Azure API Management | Microsoft Docs
3+
description: This article explains the capacity metrics in Azure API Management and how to make informed decisions about whether to scale an instance.
44
services: api-management
55
author: dlepow
66

77
ms.service: azure-api-management
88
ms.topic: how-to
9-
ms.date: 07/06/2022
9+
ms.date: 08/26/2024
1010
ms.author: danlep
1111
ms.custom: fasttrack-edit
1212
---
1313

1414
# Capacity of an Azure API Management instance
1515

16-
[!INCLUDE [api-management-availability-premium-dev-standard-basic](../../includes/api-management-availability-premium-dev-standard-basic.md)]
16+
[!INCLUDE [api-management-availability-premium-dev-standard-basic-standardv2-basicv2](../../includes/api-management-availability-premium-dev-standard-basic-standardv2-basicv2.md)]
1717

18-
**Capacity** is the most important [Azure Monitor metric](api-management-howto-use-azure-monitor.md#view-metrics-of-your-apis) for making informed decisions whether to [scale or upgrade](upgrade-and-scale.md) an API Management instance to accommodate more load. Its construction is complex and imposes certain behavior.
18+
API Management provides [Azure Monitor metrics](api-management-howto-use-azure-monitor.md#view-metrics-of-your-apis) to detect use of system capacity, helping you troubleshoot gateway problems and make informed decisions whether to [scale or upgrade](upgrade-and-scale.md) an API Management instance to accommodate more load.
1919

20-
This article explains what the **capacity** is and how it behaves. It shows how to access **capacity** metrics in the Azure portal and suggests when to consider scaling or upgrading your API Management instance.
20+
This article explains the capacity metrics and how they behave, shows how to access capacity metrics in the Azure portal, and suggests when to consider scaling or upgrading your API Management instance.
2121

2222
[!INCLUDE [api-management-workspace-availability](../../includes/api-management-workspace-availability.md)]
2323

2424
> [!IMPORTANT]
25-
> This article discusses how you can monitor and scale your Azure API Management instance based upon its capacity metric. However, it is equally important to understand what happens when an individual API Management instance has actually *reached* its capacity. Azure API Management will not apply service-level throttling to prevent a physical overload of the instances. When an instance reaches its physical capacity, it will behave similar to any overloaded web server that is unable to process incoming requests: latency will increase, connections will get dropped, timeout errors will occur, and so on. This means that API clients should be prepared to deal with this possibility as they do with any other external service (for example, by applying retry policies).
25+
> This article introduces how to monitor and scale your Azure API Management instance based on capacity metrics. However, when an instance *reaches* its capacity, it won't throttle to prevent overload. Instead, it will act like an overloaded web server: increased latency, dropped connections, and timeout errors. API clients should be ready to handle these issues as they do with other external services, for example by using retry policies.
2626
2727
## Prerequisites
2828

29-
To follow the steps in this article, you must have:
29+
To follow the steps in this article, you must have an API Management instance in one of the tiers that supports capacity metrics. For more information, see [Create an Azure API Management instance](get-started-create-service-instance.md).
3030

31-
+ An active Azure subscription.
31+
## Available capacity metrics
3232

33-
[!INCLUDE [quickstarts-free-trial-note](~/reusable-content/ce-skilling/azure/includes/quickstarts-free-trial-note.md)]
33+
Different capacity metrics are available in the [v2 service tiers](v2-service-tiers-overview.md) and classic tiers.
3434

35-
+ An API Management instance. For more information, see [Create an Azure API Management instance](get-started-create-service-instance.md).
35+
#### [v2 tiers](#tab/v2-tiers)
36+
37+
In the v2 tiers, the following metrics are available:
38+
39+
* **CPU Percentage of Gateway** - The percentage of CPU capacity used by the gateway units.
40+
41+
* **Memory Percentage of Gateway** - The percentage of memory capacity used by the gateway units.
42+
43+
Available aggregations for these metrics are as follows.
44+
45+
* **Avg** - Average percentage of capacity used across gateway processes in every [unit](upgrade-and-scale.md) of an API Management instance.
46+
* **Max** - Percentage of capacity in gateway process with the greatest consumption.
47+
48+
[!INCLUDE [api-management-cpu-memory-capacity](../../includes/api-management-cpu-memory-capacity.md)]
49+
50+
#### [Classic tiers](#tab/classic)
51+
52+
In the Developer, Basic, Standard, and Premium tiers, the **Capacity** metric is available for making decisions about scaling or upgrading an API Management instance. Its construction is complex and imposes certain behavior.
53+
54+
Available aggregations for this metric are as follows.
55+
56+
* **Avg** - Average percentage of capacity used across gateway processes in every [unit](upgrade-and-scale.md) of an API Management instance.
57+
* **Max** - Percentage of capacity in gateway process with the greatest consumption.
3658

3759
[!INCLUDE [availability-capacity.md](../../includes/api-management-availability-capacity.md)]
3860

39-
## What is capacity
61+
### What the Capacity metric indicates
4062

4163
![Diagram that explains the Capacity metric.](./media/api-management-capacity/capacity-ingredients.png)
4264

43-
**Capacity** is an indicator of load on an API Management instance. It reflects usage of resources (CPU, memory) and network queue lengths. CPU and memory usage reveals consumption of resources by:
65+
**Capacity** is an indicator of load on an API Management instance. It reflects usage of resources (CPU, memory) and network queue lengths.
4466

45-
+ API Management data plane services, such as request processing, which can include forwarding requests or running a policy.
46-
+ API Management management plane services, such as management actions applied via the Azure portal or Azure Resource Manager, or load coming from the [developer portal](api-management-howto-developer-portal.md).
47-
+ Selected operating system processes, including processes that involve cost of TLS handshakes on new connections.
48-
+ Platform updates, such as OS updates on the underlying compute resources for the instance.
49-
+ Number of APIs deployed, regardless of activity, which can consume additional capacity.
67+
[!INCLUDE [api-management-cpu-memory-capacity](../../includes/api-management-cpu-memory-capacity.md)]
5068

51-
Total **capacity** is an average of its own values from every [unit](upgrade-and-scale.md) of an API Management instance.
52-
53-
Although the **capacity metric** is designed to surface problems with your API Management instance, there are cases when problems won't be reflected in changes in the **capacity metric**.
69+
---
5470

5571
## Capacity metric behavior
5672

57-
Because of its construction, in real life **capacity** can be impacted by many variables, for example:
73+
In real life capacity metrics can be impacted by many variables, for example:
5874

5975
+ connection patterns (new connection on a request versus reusing the existing connection)
6076
+ size of a request and response
6177
+ policies configured on each API or number of clients sending requests.
6278

63-
The more complex operations on the requests are, the higher the **capacity** consumption will be. For example, complex transformation policies consume much more CPU than a simple request forwarding. Slow backend service responses will increase it, too.
79+
The more complex operations on the requests are, the higher the capacity consumption is. For example, complex transformation policies consume much more CPU than a simple request forwarding. Slow backend service responses increase it, too.
6480

6581
> [!IMPORTANT]
66-
> **Capacity** is not a direct measure of the number of requests being processed.
82+
> Capacity metrics are not direct measures of the number of requests being processed.
6783
6884
![Capacity metric spikes](./media/api-management-capacity/capacity-spikes.png)
6985

70-
**Capacity** can also spike intermittently or be greater than zero even if no requests are being processed. It happens because of system- or platform-specific actions and should not be taken into consideration when deciding whether to scale an instance.
86+
Capacity metrics can also spike intermittently or be greater than zero even if no requests are being processed. It happens because of system- or platform-specific actions and should not be taken into consideration when deciding whether to scale an instance.
87+
88+
Although capacity metrics are designed to surface problems with your API Management instance, there are cases when problems won't be reflected in changes in these metrics. Additionally, low capacity metrics don't necessarily mean that your API Management instance isn't experiencing any problems.
7189

72-
Low **capacity metric** doesn't necessarily mean that your API Management instance isn't experiencing any problems.
7390

74-
## Use the Azure portal to examine capacity
91+
## Use the Azure portal to examine capacity metrics
92+
93+
Access metrics in the portal to understand how much capacity is used over time.
94+
95+
#### [v2 tiers](#tab/v2-tiers)
96+
97+
1. Navigate to your API Management instance in the [Azure portal](https://portal.azure.com/).
98+
1. In the left menu, under **Monitoring**, select **Metrics**.
99+
1. Select the **CPU Percentage of Gateway** or **Memory Percentage of Gateway** metric from the available metrics. Choose the default **Avg** aggregation or select the **Max** aggregation to see the peak usage.
100+
1. Pick a desired timeframe from the top bar of the section.
101+
102+
> [!IMPORTANT]
103+
> Currently, the **Capacity** metric also appears in the portal for instances in v2 tiers. However, it's not supported for use in the v2 tiers and shows a value of 0.
104+
105+
> [!NOTE]
106+
> You can set a [metric alert](api-management-howto-use-azure-monitor.md#set-up-an-alert-rule) to let you know when something unexpected is happening. For example, get notifications when your API Management instance has exceeded its expected peak CPU or Memory usage for more than 20 minutes.
107+
108+
109+
#### [Classic tiers](#tab/classic)
75110

76111
![Capacity metric](./media/api-management-capacity/capacity-metric.png)
77112

78113
1. Navigate to your API Management instance in the [Azure portal](https://portal.azure.com/).
79-
2. In the left menu, under **Monitoring**, select **Metrics**.
80-
3. Select the **Capacity** metric from the available metrics and leave the default **Avg** aggregation.
114+
1. In the left menu, under **Monitoring**, select **Metrics**.
115+
1. Select the **Capacity** metric from the available metrics and leave the default **Avg** aggregation.
81116

82117
> [!TIP]
83118
> If you've deployed your instance to multiple locations, you should always look at a **capacity** metric breakdown per location to avoid wrong interpretations.
84119
85-
4. To split the metric by location, from the section at the top, select **Apply splitting** and then select **Location**.
86-
5. Pick a desired timeframe from the top bar of the section.
120+
1. To split the metric by location, from the section at the top, select **Apply splitting** and then select **Location**.
121+
1. Pick a desired timeframe from the top bar of the section.
122+
123+
> [!IMPORTANT]
124+
> Currently, the **CPU Percentage of Gateway** and **Memory Consumption of Gateway** metrics also appear in the portal for instances in classic tiers. However, they're not supported for use in classic tiers and show a value of 0.
125+
126+
87127

88-
You can set a [metric alert](api-management-howto-use-azure-monitor.md#set-up-an-alert-rule) to let you know when something unexpected is happening. For example, get notifications when your API Management instance has exceeded its expected peak capacity for more than 20 minutes.
89128

90-
>[!TIP]
91-
> You can configure alerts to let you know when your service is running low on capacity or use Azure Monitor [autoscaling](api-management-howto-autoscale.md) to automatically add an Azure API Management unit. Scaling operation can take around 30 minutes, so you should plan your rules accordingly.
92-
> Only scaling the master location is allowed.
129+
130+
> [!NOTE]
131+
> * You can set a [metric alert](api-management-howto-use-azure-monitor.md#set-up-an-alert-rule) to let you know when something unexpected is happening. For example, get notifications when your API Management instance has exceeded its expected peak capacity for more than 20 minutes.
132+
> * You can use Azure Monitor [autoscaling](api-management-howto-autoscale.md) to automatically add an Azure API Management unit. Scaling operation can take around 30 minutes, so you should plan your rules accordingly.
133+
> * In multi-region deployments, only scaling the primary location is allowed.
134+
135+
---
93136

94137
## Use capacity for scaling decisions
95138

96-
**Capacity** is the metric for making decisions whether to scale an API Management instance to accommodate more load. The following are general considerations:
139+
Use capacity metrics for making decisions whether to scale an API Management instance to accommodate more load. The following are general considerations:
97140

98141
+ Look at a long-term trend and average.
99142
+ Ignore sudden spikes that are most likely not related to an increase in load (see [Capacity metric behavior](#capacity-metric-behavior) section for explanation).
100-
+ As a general rule, upgrade or scale your instance when the **capacity** value exceeds **60% - 70%** for a long period of time (for example, 30 minutes). Different values may work better for your service or scenario.
101-
+ If your instance is configured with only 1 unit, upgrade or scale your instance when the **capacity** value exceeds **40%** for a long period. This recommendation is based on the need to reserve capacity for guest OS updates in the underlying service platform.
143+
+ As a general rule, upgrade or scale your instance when a capacity metric value exceeds **60% - 70%** for a long period of time (for example, 30 minutes). Different values may work better for your service or scenario.
144+
+ If your instance is configured with only 1 unit, upgrade or scale your instance when a capacity metric value exceeds **40%** for a long period. This recommendation is based on the need to reserve capacity for guest OS updates in the underlying service platform.
102145

103146
>[!TIP]
104147
> If you are able to estimate your traffic beforehand, test your API Management instance on workloads you expect. You can increase the request load on your tenant gradually and monitor the value of the capacity metric that corresponds to your peak load. Follow the steps from the previous section to use Azure portal to understand how much capacity is used at any given time.
105148
106-
## Next steps
149+
## Related content
107150

108151
- [Upgrade and scale an Azure API Management service instance](upgrade-and-scale.md)
109152
- [Automatically scale an Azure API Management instance](api-management-howto-autoscale.md)
110-
- [Plan and manage costs for API Management](plan-manage-costs.md)
153+
- [Plan and manage costs for API Management](plan-manage-costs.md)

0 commit comments

Comments
 (0)