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/container-apps/java-metrics-scale-with-keda.md
+60-60Lines changed: 60 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: "Tutorial: Scale a container app with Java metrics"
3
3
description: Scale a container app with Java metrics.
4
-
services: container-apps
4
+
services: azure-container-apps
5
5
author: craigshoemaker
6
6
ms.service: azure-container-apps
7
7
ms.custom: devx-track-extended-java
@@ -15,7 +15,7 @@ ms.author: cshoe
15
15
16
16
Azure Container Apps manages automatic horizontal scaling through a set of declarative scaling rules. You can create your own scale rules with [customized event sources](./scale-app.md#custom).
17
17
18
-
In this tutorial, you add a custom scale rule to scale your container app with Java metrics and observe how your application scales.
18
+
In this tutorial, you will add a custom scale rule to scale your container app with Java metrics and observe how your application scales.
19
19
20
20
## Prerequisites
21
21
@@ -41,7 +41,7 @@ Use the following steps to define environment variables and set up the environme
|`LOCATION`| The Azure region location where you create your Azure Container Apps. |
44
-
|`TENANT_ID`| Your tenant's id. |
44
+
|`TENANT_ID`| Your tenant's ID. |
45
45
| `SUBSCRIPTION_ID` | The subscription ID which you use to create your Azure Container Apps. |
46
46
| `RESOURCE_GROUP` | The Azure resource group name for your Azure Container Apps. |
47
47
| `APP_NAME` | The app name for your Azure Container Apps. |
@@ -71,7 +71,7 @@ To scale with Azure Container Apps platform metrics, you need a managed identity
71
71
2. Grant the `Monitoring Reader` role to your managed identity to read data from Azure Monitor. You can find more details about the RBAC for Azure Monitor in [Built-in Role Monitoring Reader](../role-based-access-control/built-in-roles/monitor.md#monitoring-reader).
This command adds a scale rule to your container app with the name `scale-with-azure-monitor-metrics`, and the scale type is set to `azure-monitor`. It uses the managed identity with resource id `USER_ASSIGNED_IDENTITY_ID` to authenticate with Azure Monitor and query metrics for your container app. In the example, KEDA queries the metric `JvmGcCount`, and aggregates the metric values within 1 minute with aggregation type `Total`. The target value is set to `30`, which means KEDA calculates the `desiredReplicas` using `ceil(AggregatedMetricValue(JvmGcCount)/30)`.
158
+
This command adds a scale rule to your container app with the name `scale-with-azure-monitor-metrics`, and the scale type is set to `azure-monitor`. It uses the managed identity with resource ID `USER_ASSIGNED_IDENTITY_ID` to authenticate with Azure Monitor and query metrics for your container app. In the example, KEDA queries the metric `JvmGcCount`, and aggregates the metric values within 1 minute with aggregation type `Total`. The target value is set to `30`, which means KEDA calculates the `desiredReplicas` using `ceil(AggregatedMetricValue(JvmGcCount)/30)`.
159
159
160
160
> [!NOTE]
161
161
> The metric `JvmGcCount` is only used as an example. You can use any metric from Azure Monitor. Before setting up the scale rule, view the metrics in the Azure portal to determine the appropriate metric, aggregation interval, and target value based on your application's requirements. Additionally, consider using the built-in [HTTP/TCP scale rules](./scale-app.md#http), which can meet most common scaling scenarios, before opting for a custom metric.
162
162
163
163
## View scaling in Azure portal (optional)
164
164
Once your new revision is ready, [send requests](./tutorial-scaling.md#send-requests) to your container app to trigger auto scale with your Java metrics.
165
-
1. Go to the `Metrics` blade in the Azure Portalfor your Azure Container Apps.
166
-
1. Add your metric `jvm.gc.count`, with filter `Revision=<your-revision>` and Split by `Replica`.
165
+
1. Go to the `Metrics` blade in the Azure portalfor your Azure Container Apps.
166
+
1. Add your metric `jvm.gc.count`, with filter `Revision=<your-revision>` and split by `Replica`.
167
167
1. Add the metric `Replica Count`, with filter `Revision=<your-revision>`.
168
168
169
169
Here is a sample metric snapshot for the example scale rule.
@@ -182,7 +182,7 @@ Here is a sample metric snapshot for the example scale rule.
182
182
183
183
To view the KEDA scale logs, you can run the below query in `Logs`.
0 commit comments