Skip to content

Commit 397283e

Browse files
authored
Merge pull request #297786 from ninpan-ms/main
Add how to setup auto scale settings for blue green deployments
2 parents 63d5df6 + 575aade commit 397283e

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

articles/spring-apps/basic-standard/how-to-setup-autoscale.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
title: "Set Up Autoscale for Applications"
3-
description: This article describes how to set up Autoscale settings for your applications using the Microsoft Azure portal or the Azure CLI.
2+
title: Set Up Autoscale Rules for Azure Spring Apps Applications
3+
description: Shows you how to configure autoscale settings for your applications using the Microsoft Azure portal or the Azure CLI.
44
author: KarlErickson
55
ms.author: karler
6+
ms.reviewer: ninpan-ms
67
ms.service: azure-spring-apps
78
ms.topic: how-to
89
ms.date: 06/27/2024
@@ -17,29 +18,29 @@ ms.custom: devx-track-java, devx-track-azurecli
1718

1819
**This article applies to:** ✅ Basic/Standard ✅ Enterprise
1920

20-
This article describes how to set up Autoscale settings for your applications using the Microsoft Azure portal or the Azure CLI.
21+
This article describes how to set up autoscale settings for your applications using the Microsoft Azure portal or the Azure CLI.
2122

2223
Autoscale is a built-in feature of Azure Spring Apps that helps applications perform their best when demand changes. Azure Spring Apps supports scale-out and scale-in, which includes modifying the number of app instances and load balancing.
2324

2425
## Prerequisites
2526

26-
To follow these procedures, you need:
27-
2827
* An Azure subscription. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
29-
* A deployed Azure Spring Apps service instance. Follow the [quickstart on deploying an app via the Azure CLI](./quickstart.md) to get started.
28+
* A deployed Azure Spring Apps service instance. For more information, see [Quickstart: Deploy your first application to Azure Spring Apps](./quickstart.md).
3029
* At least one application already created in your service instance.
3130

3231
## Navigate to the Autoscale page in the Azure portal
3332

33+
Use the following steps to access the autoscale settings:
34+
3435
1. Sign in to the [Azure portal](https://portal.azure.com/).
3536
1. Go to the Azure Spring Apps **Overview** page.
36-
1. Select the **Apps** tab under **Settings** in the menu on the left navigation pane.
37-
1. Select the application for which you want to set up Autoscale. In this example, select the application named **demo**. You should then see the application's **Overview** page.
38-
1. Go to the **Scale out** tab under **Settings** in the menu on the left navigation pane.
37+
1. In the navigation pane, under **Settings**, select the **Apps**.
38+
1. Select the application for which you want to set up autoscale. If set up your Azure Spring Apps instance by following the directions in [Quickstart: Deploy your first application to Azure Spring Apps](./quickstart.md), select the application named **demo**. You should then see the application's **Overview** page.
39+
1. In the navigation pane, under **Settings**, select **Scale out**.
3940

40-
## Set up Autoscale settings for your application in the Azure portal
41+
## Set up autoscale settings for your application in the Azure portal
4142

42-
There are two options for Autoscale demand management:
43+
Autoscale demand management provides the following options:
4344

4445
* Manual scale: Maintains a fixed instance count. In the Standard plan, you can scale out to a maximum of 500 instances. This value changes the number of separate running instances of the application.
4546
* Custom autoscale: Scales on any schedule, based on any metrics.
@@ -48,11 +49,11 @@ In the Azure portal, choose how you want to scale. The following figure shows th
4849

4950
:::image type="content" source="media/how-to-setup-autoscale/custom-autoscale.png" alt-text="Screenshot of the Azure portal that shows the Autoscale setting page with the Custom autoscale option highlighted." lightbox="media/how-to-setup-autoscale/custom-autoscale.png":::
5051

51-
## Set up Autoscale settings for your application in Azure CLI
52+
## Set up autoscale settings for your application in Azure CLI
5253

53-
You can also set Autoscale modes using the Azure CLI. The following commands create an Autoscale setting and an Autoscale rule.
54+
You can also set autoscale modes using the Azure CLI. The following commands create an autoscale setting and an autoscale rule. Be sure to replace the `<...>` placeholders with your own values.
5455

55-
* Create Autoscale setting:
56+
* To create an autoscale setting, use the following command:
5657

5758
```azurecli
5859
az monitor autoscale create \
@@ -64,7 +65,7 @@ You can also set Autoscale modes using the Azure CLI. The following commands cre
6465
--count 1
6566
```
6667

67-
* Create Autoscale rule:
68+
* To create an autoscale rule, use the following command:
6869

6970
```azurecli
7071
az monitor autoscale rule create \
@@ -77,6 +78,22 @@ You can also set Autoscale modes using the Azure CLI. The following commands cre
7778

7879
For information on the available metrics, see the [User metrics options](./concept-metrics.md#user-metrics-options) section of [Metrics for Azure Spring Apps](./concept-metrics.md).
7980

81+
## Set up autoscale settings for blue-green deployments
82+
83+
Use the following steps to set up metrics-based autoscale settings for blue-green deployments:
84+
85+
> [!IMPORTANT]
86+
> Create separate autoscale rules for each deployment. Set up one rule for the blue deployment, and a separate rule for the green deployment.
87+
88+
1. In the Azure portal, navigate to the **Autoscale setting** page as described previously.
89+
1. Select **Custom autoscale**.
90+
1. Within a scale condition, select **Add a rule**.
91+
1. Choose values for the **App** dimension.
92+
1. For the **Deployment** dimension, set the value to either the blue or the green deployment name, not to **All values**.
93+
1. For the **Instance** dimension, set the value to **All values**. This ensures that the rule applies to all instances within the selected deployment.
94+
95+
This setup enables each deployment to scale based on its own metrics, avoiding conflicts or unexpected behavior during rollouts.
96+
8097
## Upgrade to the Standard plan
8198

8299
If you're on the Basic plan and constrained by one or more of these limits, you can upgrade to the Standard plan. To upgrade, go to the **Pricing** plan menu by first selecting the **Standard tier** column and then selecting the **Upgrade** button.

0 commit comments

Comments
 (0)