Skip to content

Commit bd9e322

Browse files
committed
fixes
1 parent 6c606b6 commit bd9e322

File tree

1 file changed

+100
-25
lines changed

1 file changed

+100
-25
lines changed

articles/azure-monitor/autoscale/autoscale-understanding-settings.md

Lines changed: 100 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
title: Understanding autoscale settings in Azure Monitor
33
description: "A detailed breakdown of autoscale settings and how they work. Applies to Virtual Machines, Cloud Services, Web Apps"
44
author: EdB-MSFT
5+
ms.service: azure-monitor
56
ms.topic: conceptual
67
ms.date: 11/02/2022
78
ms.subservice: autoscale
89
ms.custom: ignite-2022
9-
ms.author: ebayansh
10+
ms.author: edbayansh
1011
ms.reviewer: akkumari
1112

1213
---
@@ -29,16 +30,22 @@ The following example shows an autoscale setting. This autoscale setting has the
2930
3031
```JSON
3132
{
32-
"id": "/subscriptions/s1/resourceGroups/rg1/providers/microsoft.insights/autoscalesettings/setting1",
33-
"name": "setting1",
34-
"type": "Microsoft.Insights/autoscaleSettings",
35-
"location": "East US",
36-
"properties": {
37-
"enabled": true,
38-
"targetResourceUri": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1",
33+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
34+
"contentVersion": "1.0.0.0",
35+
"resources": [
36+
{
37+
"type": "Microsoft.Insights/autoscaleSettings",
38+
"apiVersion": "2015-04-01",
39+
"name": "VMSS1-Autoscale-607",
40+
"location": "eastus",
41+
"properties": {
42+
43+
"name": "VMSS1-Autoscale-607",
44+
"enabled": true,
45+
"targetResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
3946
"profiles": [
4047
{
41-
"name": "mainProfile",
48+
"name": "Auto created default scale condition",
4249
"capacity": {
4350
"minimum": "1",
4451
"maximum": "4",
@@ -48,7 +55,7 @@ The following example shows an autoscale setting. This autoscale setting has the
4855
{
4956
"metricTrigger": {
5057
"metricName": "Percentage CPU",
51-
"metricResourceUri": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1",
58+
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
5259
"timeGrain": "PT1M",
5360
"statistic": "Average",
5461
"timeWindow": "PT10M",
@@ -66,7 +73,7 @@ The following example shows an autoscale setting. This autoscale setting has the
6673
{
6774
"metricTrigger": {
6875
"metricName": "Percentage CPU",
69-
"metricResourceUri": "/subscriptions/s1/resourceGroups/rg1/providers/Microsoft.Compute/virtualMachineScaleSets/vmss1",
76+
"metricResourceUri": "/subscriptions/abc123456-987-f6e5-d43c-9a8d8e7f6541/resourceGroups/rg-vmss1/providers/Microsoft.Compute/virtualMachineScaleSets/VMSS1",
7077
"timeGrain": "PT1M",
7178
"statistic": "Average",
7279
"timeWindow": "PT10M",
@@ -120,23 +127,18 @@ The table below describes the elements in the above autoscale setting's JSON.
120127
There are three types of autoscale profiles:
121128

122129
- **Default profile:** Use the default profile if you don’t need to scale your resource based on a particular date and time, or day of the week, use a regular or default profile. You can only have one default profile. The sample profile used above is an example of a default profile.
123-
-
124130
- **Fixed date profile:** This profile is relevant for a single date and time. Use the fixed date profile to set scaling rules for a specific event. The profile runs only on the event’s date and time. For all other times, autoscale uses the default profile.
125131

126132
```json
133+
...
127134
"profiles": [
128135
{
129136
"name": " regularProfile",
130137
"capacity": {
131138
...
132139
},
133140
"rules": [
134-
{
135141
...
136-
},
137-
{
138-
...
139-
}
140142
]
141143
},
142144
{
@@ -145,12 +147,7 @@ There are three types of autoscale profiles:
145147
...
146148
},
147149
"rules": [
148-
{
149150
...
150-
},
151-
{
152-
...
153-
}
154151
],
155152
"fixedDate": {
156153
"timeZone": "Pacific Standard Time",
@@ -161,9 +158,86 @@ There are three types of autoscale profiles:
161158
]
162159
```
163160

164-
- **Recurrence profile:** A recurrence profile is used for a day or set of days of the week. The schema for a recurring profile doesn't include an end date. The end of date and time for a recurring profile is set by the start time of the following profile. When using the portal to configure recurring profiles, the default profile is automatically duplicated, and restarts at the time that you specify for the recurring profile to end. For more information on configuring multiple profiles, see [Autoscale with multiple profiles](./autoscale-multiprofile.md)
165-
161+
- **Recurrence profile:** A recurrence profile is used for a day or set of days of the week. The schema for a recurring profile doesn't include an end date. The end of date and time for a recurring profile is set by the start time of the following profile. When using the portal to configure recurring profiles, the default profile is automatically updated to start at the end time that you specify for the recurring profile. For more information on configuring multiple profiles, see [Autoscale with multiple profiles](./autoscale-multiprofile.md)
166162

163+
The partial schema example below shows a recurring profile, starting at 06:00 and ending at 19:00 on Saturdays and Sundays. The default profile has been modified to start at 19:00 on Saturdays and Sundays.
164+
165+
``` JSON
166+
{
167+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
168+
"contentVersion": "1.0.0.0",
169+
"resources": [
170+
{
171+
"type": "Microsoft.Insights/ autoscaleSettings",
172+
"apiVersion": "2015-04-01",
173+
"name": "VMSS1-Autoscale-607",
174+
"location": "eastus",
175+
"properties": {
176+
177+
"name": "VMSS1-Autoscale-607",
178+
"enabled": true,
179+
"targetResourceUri": "/subscriptions/ abc123456-987-f6e5-d43c-9a8d8e7f6541/ resourceGroups/rg-vmss1/providers/ Microsoft.Compute/ virtualMachineScaleSets/VMSS1",
180+
"profiles": [
181+
{
182+
"name": "Weekend profile",
183+
"capacity": {
184+
...
185+
},
186+
"rules": [
187+
...
188+
],
189+
"recurrence": {
190+
"frequency": "Week",
191+
"schedule": {
192+
"timeZone": "E. Europe Standard Time",
193+
"days": [
194+
"Saturday",
195+
"Sunday"
196+
],
197+
"hours": [
198+
6
199+
],
200+
"minutes": [
201+
0
202+
]
203+
}
204+
}
205+
},
206+
{
207+
"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"Weekend profile\"}",
208+
"capacity": {
209+
...
210+
},
211+
"recurrence": {
212+
"frequency": "Week",
213+
"schedule": {
214+
"timeZone": "E. Europe Standard Time",
215+
"days": [
216+
"Saturday",
217+
"Sunday"
218+
],
219+
"hours": [
220+
19
221+
],
222+
"minutes": [
223+
0
224+
]
225+
}
226+
},
227+
"rules": [
228+
...
229+
]
230+
}
231+
],
232+
"notifications": [],
233+
"targetResourceLocation": "eastus"
234+
}
235+
236+
}
237+
]
238+
}
239+
240+
```
167241
## Autoscale evaluation
168242

169243
Autoscale settings can have multiple profiles. Each profile can have multiple metric rules. Each time the autoscale job runs, it begins by choosing the applicable profile for that time. Then autoscale evaluates the minimum and maximum values, any metric rules in the profile, and decides if a scale action is necessary. The autoscale job runs every 30 to 60 seconds, depending on the resource type.
@@ -182,7 +256,8 @@ The first suitable profile found will be used.
182256

183257
After autoscale determines which profile to run, it evaluates the scale-out rules in the profile, that is, where **direction = “Increase”**.
184258
If one or more scale-out rules are triggered, autoscale calculates the new capacity determined by the **scaleAction** specified for each of those rules. If there's more than one scale-out rule triggered, autoscale scales to the maximum specified capacity to ensure service availability.
185-
For example, There are two rules: Rule1 specifies scale out by 3 instances and rule 2 specifies scale out by 5. IF Both rules are triggered, autoscale will scale out by 5 instances. Similarly, if one rule specifies scale out by 3 instances and another rule, scale out by 15%, the higher of the two instance counts will be used.
259+
260+
For example, assume that there are two rules: Rule1 specifies scale out by 3 instances and rule 2 specifies scale out by 5. If both rules are triggered, autoscale will scale out by 5 instances. Similarly, if one rule specifies scale out by 3 instances and another rule, scale out by 15%, the higher of the two instance counts will be used.
186261

187262
If no scale-out rules are triggered, autoscale evaluates all the scale-in rules, that is, rules with **direction = “Decrease”**. Autoscale only scales in if all of the scale-in rules are triggered.
188263

0 commit comments

Comments
 (0)