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/azure-monitor/autoscale/autoscale-multiprofile.md
+33-17Lines changed: 33 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Autoscale with multiple profiles
3
-
description: "Using multiple profiles in autoscale"
2
+
title: Autoscale with different profiles
3
+
description: "Using different profiles in autoscale"
4
4
author: EdB-MSFT
5
5
ms.author: edbaynash
6
6
ms.service: azure-monitor
@@ -13,7 +13,11 @@ ms.reviewer: akkumari
13
13
# Customer intent: As a user or dev ops administrator, I want to understand how set up autoscale with more than one profile so I can scale my resources with more flexibility.
14
14
---
15
15
16
-
# Autoscale with multiple profiles
16
+
# Autoscale with different profiles
17
+
18
+
Scaling your resources for a particular day of the week, or a specific date and time can reduce costs while still providing the capacity you need when you need it.
19
+
20
+
Use multiple profiles in autoscale to scale in different ways at different times. If for example, your business isn't active on the weekend, create a recurring profile to scale back your resources on Saturdays and Sundays.
17
21
18
22
This article explains the different profiles in autoscale and how to use them.
19
23
@@ -23,7 +27,7 @@ There are three types of profile:
23
27
24
28
* Recurring profiles. A recurring profile is valid for a specific time range and repeats for selected days of the week.
25
29
* Fixed date and time profiles. A profile that is valid for a time range on a specific date.
26
-
* The default profile. The default profile is created automatically and isn't dependent on a schedule. The default profile can't be deleted.
30
+
* The default profile. The default profile is created automatically and isn't dependent on a schedule. The default profile can't be deleted. The default profile is used when there are no other profiles that match the current date and time.
27
31
28
32
Each time the autoscale service runs, the profiles are evaluated in the following order:
29
33
@@ -33,14 +37,14 @@ Each time the autoscale service runs, the profiles are evaluated in the followin
33
37
34
38
If a profile's date and time conditions match the current time, autoscale will apply that profile's limits and rules. Only the first applicable profile is used.
35
39
36
-
The example below shows an autoscale setting with a default profile and recurring profile as follows.
40
+
The example below shows an autoscale setting with a default profile and recurring profile.
37
41
38
42
:::image type="content" source="./media/autoscale-multiple-profiles/autoscale-default-recurring-profiles.png" alt-text="A screenshot showing an autoscale setting with default and recurring profile or scale condition":::
39
43
40
44
On Monday after 6 AM, the recurring profile will be used. If the instance count is two, autoscale scales to the new minimum of three. Autoscale continues to use this profile and scales based on CPU% until Monday at 6 PM.
41
45
42
46
At all other times scaling will be done according to the default profile, based on the number of requests.
43
-
After 6 PM on Monday, autoscale switches to the default profile. If, for example the number of instances at the time is 12, autoscale scales in to 10, which the maximum allowed for the default profile.
47
+
After 6 PM on Monday, autoscale switches to the default profile. If for example, the number of instances at the time is 12, autoscale scales in to 10, which the maximum allowed for the default profile.
44
48
45
49
## Multiple profiles using templates and CLI
46
50
@@ -51,14 +55,17 @@ When creating multiple profiles using templates and the CLI, follow the guidelin
51
55
Follow the rules below when using ARM templates to create autoscale settings with multiple profiles:
52
56
53
57
* Create a default profile for each recurring profile. If you have two recurring profiles, create two matching default profiles.
54
-
* The default profile must contain a `recurrence` section that is the same as the recurring profile, with the `hours` and `minutes` elements set for the end time of the recurring profile. If you do not specify a recurrence with a start time for the default profile, the last recurrence rule will remain in effect.
55
-
These rules do not apply for a non-recurring scheduled profile.
56
-
* The `name` element for the default profile is an object with the following format: `"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"Recurring profile name\"}"` where the recurring profile name is the value of the `name` element for the recurring profile. If this is not specified correctly, the default profile will appear as another recurring profile.
58
+
* The default profile must contain a `recurrence` section that is the same as the recurring profile, with the `hours` and `minutes` elements set for the end time of the recurring profile. If you don't specify a recurrence with a start time for the default profile, the last recurrence rule will remain in effect.
59
+
These rules don't apply for a non-recurring scheduled profile.
60
+
* The `name` element for the default profile is an object with the following format: `"name": "{\"name\":\"Auto created default scale condition\",\"for\":\"Recurring profile name\"}"` where the recurring profile name is the value of the `name` element for the recurring profile. If the name isn't specified correctly, the default profile will appear as another recurring profile.
57
61
58
-
The example below shows the JSON for two recurring profiles. One for weekends between 06:00 and 19:00, Saturday and Sunday, and a second for Mondays between 04:00 and 15:00. Note the tow default profiles, one for each recurring profile.
62
+
## Add a recurring profile using AIM templates
59
63
60
-
This autoscale setting was created with the follwoing command:
64
+
The example below shows how to create two recurring profiles. One profile for weekends between 06:00 and 19:00, Saturday and Sunday, and a second for Mondays between 04:00 and 15:00. Note the two default profiles, one for each recurring profile.
65
+
66
+
Use the following command to deploy the template:
61
67
` az deployment group create --name VMSS1-Autoscale-607 --resource-group rg-vmss1 --template-file VMSS1-autoscale.json`
68
+
where `VMSS1-autoscale.json` is the the file containing the JSON object below.
62
69
63
70
```JSON
64
71
{
@@ -318,12 +325,14 @@ This autoscale setting was created with the follwoing command:
318
325
319
326
The CLI can be used to create addition profiles in your autoscale settings.
320
327
321
-
To create a recurring profile
328
+
The following steps show how to create an autoscale profile using the CLI.
322
329
1. Create the profile using `az monitor autoscale profile create`. Specify the `--start` and `--end` time and the `--recurrence`
323
-
1. Create a scale out rule using `az monitor autoscale rule create` using ``--scale out`
324
-
1. Create a scale in rule using `az monitor autoscale rule create` using ``--scale in`
330
+
1. Create a scale-out rule using `az monitor autoscale rule create` using `--scale out`
331
+
1. Create a scale in rule using `az monitor autoscale rule create` using `--scale in`
332
+
333
+
## Add a recurring profile using CLI
325
334
326
-
The example below shows the addition of a recurring profile, recurring on Thursdays between 06:00 and 22:50.
335
+
The example below shows how to add a recurring autoscale profile, recurring on Thursdays between 06:00 and 22:50.
> The default profile also has a recurrence clause added to it that starts at the end time specified for the new recurring profile.
341
350
> A new default profile is created for each recurring profile.
342
351
343
-
After adding recurring profiles, your default profile is renamed. If you have multiple recurring profiles and want to update your default profile the update mast be made to each default profile that corresponds to a recurring profile.
352
+
## Updating the default profile when you have recurring profiles
353
+
354
+
After you add recurring profiles, your default profile is renamed. If you have multiple recurring profiles and want to update your default profile, the update must be made to each default profile corresponding to a recurring profile.
344
355
345
356
For example, if you have two recurring profiles called *Wednesdays* and *Thursdays*, you need two commands to add a rule to the default profile.
*[REST API reference. Autoscale Settings](rest/api/monitor/autoscale-settings).
370
+
*[Advanced autoscale configuration using Resource Manager templates for virtual machine scale sets](autoscale-virtual-machine-scale-sets.md) for different resources in Azure.
0 commit comments