|
1 | 1 | ---
|
2 | 2 | title: Overview of common autoscale patterns
|
3 | 3 | description: Learn some of the common patterns to auto scale your resource in Azure.
|
| 4 | +author: EdB-MSFT |
4 | 5 | ms.topic: conceptual
|
5 |
| -ms.date: 04/22/2022 |
| 6 | +ms.date: 11/17/2022 |
6 | 7 | ms.subservice: autoscale
|
7 |
| -ms.reviewer: riroloff |
| 8 | +ms.author: edbaynash |
| 9 | +ms.reviewer: akkumari |
8 | 10 | ---
|
9 | 11 | # Overview of common autoscale patterns
|
10 |
| -This article describes some of the common patterns to scale your resource in Azure. |
11 | 12 |
|
12 |
| -Azure Monitor autoscale applies only to [Virtual Machine Scale Sets](https://azure.microsoft.com/services/virtual-machine-scale-sets/), [Cloud Services](https://azure.microsoft.com/services/cloud-services/), [App Service - Web Apps](https://azure.microsoft.com/services/app-service/web/), and [API Management services](../../api-management/api-management-key-concepts.md). |
| 13 | +Autoscale settings help ensure that you have the right amount of resources running to handle the fluctuating load of your application. You can configure autoscale settings to be triggered based on metrics that indicate load or performance, or triggered at a scheduled date and time. |
13 | 14 |
|
14 |
| -## Lets get started |
| 15 | +Azure autoscale supports many resource types. For more information about supported resources, see [autoscale supported resources](./autoscale-overview.md/#supported-services-for-autoscale). |
15 | 16 |
|
16 |
| -This article assumes that you are familiar with auto scale. You can [get started here to scale your resource][1]. The following are some of the common scale patterns. |
| 17 | +This article describes some of the common patterns you can use to scale your resources in Azure. |
| 18 | +## Prerequisites |
17 | 19 |
|
18 |
| -## Scale based on CPU |
| 20 | +This article assumes that you're familiar with auto scale.[Get started here to scale your resource](./autoscale-get-started.md). |
19 | 21 |
|
20 |
| -You have a web app (/VMSS/cloud service role) and |
| 22 | +## Scale based on metrics |
21 | 23 |
|
22 |
| -- You want to scale out/scale in based on CPU. |
23 |
| -- Additionally, you want to ensure there is a minimum number of instances. |
24 |
| -- Also, you want to ensure that you set a maximum limit to the number of instances you can scale to. |
| 24 | +Scale your resource based on metrics produce by the resource itself or any other resource. |
| 25 | +For example: |
| 26 | +* Scale your Virtual Machine Scale Set based on CPU usage of the virtual machine. |
| 27 | +* Ensure a minimum number of instances. |
| 28 | +* Set a maximum limit on the number of instances. |
| 29 | +The image below shows a default scale condition for a Virtual Machine Scale Set |
| 30 | + * The **Scale rule** tab shows that the metric source is the scale set itself and the metric used is Percentage CPU. |
| 31 | + * The minimum number of instances running is set to 2. |
| 32 | + * The maximum number of instances is set to 10. |
| 33 | + * When the scale set starts, the default number of instances is 3. |
25 | 34 |
|
26 |
| -[](./media/autoscale-common-scale-patterns/scale-based-on-cpu.png#lightbox) |
| 35 | +:::image type="content" source="./media/autoscale-common-scale-patterns/scale-based-on-cpu.png" alt-text="A screenshot showing an autoscale setting, scaling by CPU %." lightbox="./media/autoscale-common-scale-patterns/scale-based-on-cpu.png"::: |
27 | 36 |
|
28 |
| -## Scale differently on weekdays vs weekends |
29 |
| - |
30 |
| -You have a web app (/VMSS/cloud service role) and |
31 |
| - |
32 |
| -- You want 3 instances by default (on weekdays) |
33 |
| -- You don't expect traffic on weekends and hence you want to scale down to 1 instance on weekends. |
| 37 | +## Scale based on another resource's metric |
34 | 38 |
|
35 |
| -[](./media/autoscale-common-scale-patterns/scale-differently-on-weekends.png#lightbox) |
| 39 | +Scale a resource based on the metrics from a different resource. |
| 40 | +The image below shows a scale rule that is scaling a Virtual Machine Scale Set based on the number of allocated ports on a load balancer. |
36 | 41 |
|
37 |
| -## Scale differently during holidays |
| 42 | +:::image type="content" source="./media/autoscale-common-scale-patterns/scale-rule-other-resource.png" alt-text="A screenshot showing autoscale rule based on load balancer metrics." lightbox="./media/autoscale-common-scale-patterns/scale-rule-other-resource.png"::: |
38 | 43 |
|
39 |
| -You have a web app (/VMSS/cloud service role) and |
| 44 | +## Scale differently on weekdays vs weekends |
40 | 45 |
|
41 |
| -- You want to scale up/down based on CPU usage by default |
42 |
| -- However, during holiday season (or specific days that are important for your business) you want to override the defaults and have more capacity at your disposal. |
| 46 | +You can scale your resources differently on different days of the week or on specific dates. |
| 47 | +For example, you have a web app and want to: |
| 48 | +- Set a minimum of 3 instances on weekdays |
| 49 | +- Scale down to 1 instance on weekends when there's less traffic. |
43 | 50 |
|
44 |
| -[](./media/autoscale-common-scale-patterns/scale-for-holiday.png#lightbox) |
| 51 | +:::image type="content" source="./media/autoscale-common-scale-patterns/scale-differently-on-weekends.png" alt-text="A screenshot showing two autoscale profiles, one default and one for weekends." lightbox="./media/autoscale-common-scale-patterns/scale-differently-on-weekends.png"::: |
45 | 52 |
|
46 |
| -## Scale based on custom metric |
| 53 | +## Scale differently during specific events |
47 | 54 |
|
48 |
| -You have a web front end and an API tier that communicates with the backend. |
| 55 | +You can set your scale rules and instance limits differently for specific events. |
| 56 | +For example: |
| 57 | +- Set a minimum of 3 instances by default |
| 58 | +- For the week of Back Friday, set the minimum number of instances to 10 to handle the anticipated traffic. |
49 | 59 |
|
50 |
| -- You want to scale the API tier based on custom events in the front end (example: You want to scale your checkout process based on the number of items in the shopping cart) |
| 60 | +:::image type="content" source="./media/autoscale-common-scale-patterns/scale-for-holiday.png" alt-text="A screenshot showing two autoscale profiles, one default and one for a specific date range." lightbox="./media/autoscale-common-scale-patterns/scale-for-holiday.png"::: |
51 | 61 |
|
52 |
| -![Scale based on custom metric][5] |
| 62 | +## Scale based on custom metric |
| 63 | +Scale by custom metrics generated by your application. |
| 64 | +For example, you have a web front end and an API tier that communicates with the backend, and you want to scale the API tier based on custom events in the front end. |
53 | 65 |
|
54 |
| -<!--Reference--> |
55 |
| -[1]: ./autoscale-get-started.md |
56 |
| -[2]: ./media/autoscale-common-scale-patterns/scale-based-on-cpu.png |
57 |
| -[3]: ./media/autoscale-common-scale-patterns/weekday-weekend-scale.png |
58 |
| -[4]: ./media/autoscale-common-scale-patterns/holidays-scale.png |
59 |
| -[5]: ./media/autoscale-common-scale-patterns/custom-metric-scale.png |
| 66 | +:::image type="content" source="./media/autoscale-common-scale-patterns/custom-metric-scale.png" alt-text="A screenshot showing an autoscale profile, and rule scaling by a custom metric." lightbox="./media/autoscale-common-scale-patterns/custom-metric-scale.png"::: |
0 commit comments