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
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.
21
22
22
23
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.
23
24
24
25
## Prerequisites
25
26
26
-
To follow these procedures, you need:
27
-
28
27
* 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).
30
29
* At least one application already created in your service instance.
31
30
32
31
## Navigate to the Autoscale page in the Azure portal
33
32
33
+
Use the following steps to access the autoscale settings:
34
+
34
35
1. Sign in to the [Azure portal](https://portal.azure.com/).
35
36
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**.
39
40
40
-
## Set up Autoscale settings for your application in the Azure portal
41
+
## Set up autoscale settings for your application in the Azure portal
41
42
42
-
There are two options for Autoscale demand management:
43
+
Autoscale demand management provides the following options:
43
44
44
45
* 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.
45
46
* 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
48
49
49
50
:::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":::
50
51
51
-
## Set up Autoscale settings for your application in Azure CLI
52
+
## Set up autoscale settings for your application in Azure CLI
52
53
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.
54
55
55
-
*Create Autoscale setting:
56
+
*To create an autoscale setting, use the following command:
56
57
57
58
```azurecli
58
59
az monitor autoscale create \
@@ -64,7 +65,7 @@ You can also set Autoscale modes using the Azure CLI. The following commands cre
64
65
--count 1
65
66
```
66
67
67
-
*Create Autoscale rule:
68
+
*To create an autoscale rule, use the following command:
68
69
69
70
```azurecli
70
71
az monitor autoscale rule create \
@@ -79,16 +80,19 @@ For information on the available metrics, see the [User metrics options](./conce
79
80
80
81
## Set up autoscale settings for blue-green deployments
81
82
82
-
Use the following steps to set metrics-based autoscale settings for a blue-green deployment rule:
83
+
Use the following steps to set up metrics-based autoscale settings for blue-green deployments:
83
84
84
85
> [!IMPORTANT]
85
86
> Create separate autoscale rules for each deployment. Set up one rule for the blue deployment, and a separate rule for the green deployment.
86
87
87
-
1. Select the **App** dimension.
88
-
1. Add the **Deployment** dimension, and set the value to either the blue or green deployment name, not **All values**.
89
-
1. Set the **Instance** dimension to **All values**. This ensures the rule applies to all instances within the selected deployment.
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.
90
94
91
-
This setup allows each deployment scale to be based on its own metrics, avoiding conflicts or unexpected behavior during rollouts.
95
+
This setup enables each deployment to scale based on its own metrics, avoiding conflicts or unexpected behavior during rollouts.
0 commit comments