Skip to content

Commit fef5fbf

Browse files
committed
edits
1 parent 169fb1b commit fef5fbf

File tree

3 files changed

+45
-33
lines changed

3 files changed

+45
-33
lines changed
-427 KB
Loading
Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
---
2-
title: Set up autoscale for Standard Consumption plan applications
3-
description: Learn how to set up autoscale for Standard Consumption plan applications.
2+
title: Quickstart - Set up autoscale for applications in Azure Spring Apps Standard consumption plan
3+
description: Learn how to set up autoscale for applications in Azure Spring Apps Standard consumption plan.
44
author: karlerickson
55
ms.author: haojianzhong
66
ms.service: spring-apps
7-
ms.topic: how-to
8-
ms.date: 03/8/2023
7+
ms.topic: quickstart
8+
ms.date: 03/21/2023
99
ms.custom: devx-track-java
1010
---
1111

12-
# Set up autoscale for Standard Consumption plan applications
12+
# Quickstart: Set up autoscale for applications in Azure Spring Apps Standard consumption plan
1313

14-
This article describes how to set up autoscale rules for your applications in Azure Spring Apps Standard consumption plan. The plan uses Azure Container Apps environment to host your Spring applications, and provides the following management and support:
14+
This article describes how to set up autoscale rules for your applications in Azure Spring Apps Standard consumption plan. The plan uses an Azure Container Apps environment to host your Spring applications, and provides the following management and support:
1515

1616
- Manages automatic horizontal scaling through a set of declarative scaling rules.
17-
1817
- Supports all the scaling rules that Azure Container Apps supports.
1918

20-
For more information, see [Azure Container Apps documentation](/azure/container-apps/).
19+
For more information, see [Azure Container Apps documentation](../container-apps/index.yml).
2120

2221
## Prerequisites
2322

2423
- An Azure subscription. If you don't have an Azure subscription, see [Azure free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
25-
2624
- A deployed Azure Spring Apps service instance.
27-
2825
- At least one application already created in your service instance.
2926

3027
## Scale definition
@@ -33,24 +30,24 @@ Scaling is defined by the combination of limits and rules.
3330

3431
- Limits are the minimum and maximum number of instances that your Spring allows.
3532

36-
| Scale limit | Default value | Min value | Max value |
37-
|-------------------------------------------|---------------|-----------|-----------|
33+
| Scale limit | Default value | Min value | Max value |
34+
|--------------------------------------------|---------------|-----------|-----------|
3835
| Minimum number of instances per deployment | 1 | 0 | 30 |
3936
| Maximum number of instances per deployment | 10 | 1 | 30 |
4037

41-
By default, the minimum instance number of your Spring application is set to 1 to ensure that your deployment is always running. If you want to scale in to zero, you can set the minimum instance count to zero.
38+
By default, the minimum instance count of your Spring application is set to 1 to ensure that your deployment is always running. If you want to scale in to zero, you can set the minimum instance count to zero.
4239

43-
- Rules are the criteria that the autoscaling abides by to add or remove instances. The scale rules include HTTP, TCP, and Custom rules as described in [Set scaling rules in Azure Container Apps](/azure/container-apps/scale-app?pivots=azure-cli#scale-rules).
40+
- Rules are the criteria that the autoscaling abides by to add or remove instances. The scale rules include HTTP, TCP, and Custom rules as described in the [Scale rules](../container-apps/scale-app.md#scale-rules) section of [Set scaling rules in Azure Container Apps](../container-apps/scale-app.md).
4441

4542
If you define more than one scale rule, the autoscaling begins when the first condition of any rule is met.
4643

47-
- The polling interval and cooldown period are two time spans that occur during autoscaling.
44+
- The *polling interval* and *cooldown period* are two time spans that occur during autoscaling.
4845
- The polling interval defines the time span between each polling action of real time data as defined by your rules. The polling interval is set to 30 seconds by default.
49-
- The cooldown period applies only when scaling to zero. For example, to wait five minutes after the last time autoscaling checked the message queue and it was empty.
46+
- The cooldown period applies only when scaling to zero - for example, to wait five minutes after the last time autoscaling checked the message queue and it was empty.
5047

5148
## Set up autoscale settings
5249

53-
You can set up autoscale settings for your application using the Azure portal or Azure CLI.
50+
You can set up autoscale settings for your application by using the Azure portal or Azure CLI.
5451

5552
### [Azure portal](#tab/azure-portal)
5653

@@ -60,34 +57,47 @@ Use the following steps to define autoscale settings and rules.
6057
1. Select **Azure Spring Apps** under **Azure services**.
6158
1. In the **Name** column, select the Azure Spring Apps instance that you want to autoscale.
6259
1. On the overview page for your Azure Spring Apps instance, select **Apps** in the navigation pane.
63-
1. Select the application for which you want to autoscale.
60+
1. Select the application that you want to autoscale.
6461
1. On the overview page for the selected app, select **Scale out** in the navigation pane.
65-
1. On the **Scale out (Preview)** page, select the deployment you want to autoscale.
62+
1. On the **Scale out (Preview)** page, select the deployment you want to autoscale.
6663
1. Set up the instance limits of your deployment.
6764
1. Select **Add** to add your scale rules. To define your custom rules, see [Keda scalers](https://keda.sh/docs/2.9/scalers/).
6865

6966
:::image type="content" source="media/quickstart-apps-autoscale/autoscale-setting.png" alt-text="Screenshot of the Azure portal preview version showing the Scale out page for an app in an Azure Spring Apps instance." lightbox="media/quickstart-apps-autoscale/autoscale-setting.png":::
7067

7168
### [Azure CLI](#tab/azure-cli)
7269

73-
The following commands show how to create an Azure Spring Apps application with an autoscaling rule. The replicas count will be automatically ajusted according to the count of messages in Azure Service Bus Queue.
70+
Use the following commands to create an application in Azure Spring Apps with an autoscaling rule. The replicas count is adjusted automatically according to the count of messages in Azure Service Bus Queue.
7471

7572
```azurecli-interactive
76-
az spring app create
77-
--resource-group <resource-group>
78-
--service <azure-spring-apps-service-instance-name>
79-
--name <app-name>
80-
--secrets "connection-string-secret=<service-bus-connection-string>"
81-
--scale-rule-name azure-servicebus-queue-rule
82-
--scale-rule-type azure-servicebus
83-
--scale-rule-metadata "queueName=my-queue"
84-
"namespace=service-bus-namespace"
85-
"messageCount=5"
86-
--scale-rule-auth "connection=connection-string-secret"
87-
--min-replicas 0
88-
--max-replicas 5
73+
az spring app create \
74+
--resource-group <resource-group-name> \
75+
--service <Azure-Spring-Apps-service-instance-name> \
76+
--name <app-name> \
77+
--secrets "connection-string-secret=<service-bus-connection-string>" \
78+
--scale-rule-name azure-servicebus-queue-rule \
79+
--scale-rule-type azure-servicebus \
80+
--scale-rule-metadata "queueName=my-queue" \
81+
"namespace=service-bus-namespace" \
82+
"messageCount=5" \
83+
--scale-rule-auth "connection=connection-string-secret" \
84+
--min-replicas 0 \
85+
--max-replicas 5
8986
```
9087

9188
---
9289

90+
## Clean up resources
91+
92+
Be sure to delete the resources you created in this article when you no longer need them. To delete the resources, just delete the resource group that contains them. You can delete the resource group using the Azure portal. Alternately, to delete the resource group by using Azure CLI, use the following commands:
93+
94+
```azurecli
95+
echo "Enter the Resource Group name:" &&
96+
read resourceGroupName &&
97+
az group delete --name $resourceGroupName &&
98+
echo "Press [ENTER] to continue ..."
99+
```
100+
93101
## Next steps
102+
103+
- [Azure Spring Apps documentation](./index.yml)

articles/spring-apps/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ items:
2525
href: quickstart-provision-app-environment-with-virtual-network.md
2626
- name: Launch your first event-driven app
2727
href: quickstart-deploy-event-driven-app-standard-consumption.md
28+
- name: Set up autoscale
29+
href: quickstart-apps-autoscale.md
2830
- name: Run apps on Basic/Standard tier
2931
expanded: true
3032
items:

0 commit comments

Comments
 (0)