|
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 the CPU usage of the virtual machine. |
| 27 | +* Ensure a minimum number of instances. |
| 28 | +* Set a maximum limit on the number of instances. |
25 | 29 |
|
26 |
| -[](./media/autoscale-common-scale-patterns/scale-based-on-cpu.png#lightbox) |
| 30 | +The image below shows a default scale condition for a Virtual Machine Scale Set |
| 31 | + * The **Scale rule** tab shows that the metric source is the scale set itself and the metric used is Percentage CPU. |
| 32 | + * The minimum number of instances running is set to 2. |
| 33 | + * The maximum number of instances is set to 10. |
| 34 | + * When the scale set starts, the default number of instances is 3. |
27 | 35 |
|
28 |
| -## Scale differently on weekdays vs weekends |
| 36 | +:::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"::: |
29 | 37 |
|
30 |
| -You have a web app (/VMSS/cloud service role) and |
| 38 | +## Scale based on another resource's metric |
31 | 39 |
|
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. |
| 40 | +Scale a resource based on the metrics from a different resource. |
| 41 | +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. |
34 | 42 |
|
35 |
| -[](./media/autoscale-common-scale-patterns/scale-differently-on-weekends.png#lightbox) |
| 43 | +:::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"::: |
36 | 44 |
|
37 |
| -## Scale differently during holidays |
| 45 | +## Scale differently on weekends |
38 | 46 |
|
39 |
| -You have a web app (/VMSS/cloud service role) and |
| 47 | +You can scale your resources differently on different days of the week.. |
| 48 | +For example, you have a web app and want to: |
| 49 | +- Set a minimum of 3 instances on weekdays. |
| 50 | +- Scale down to 1 instance on weekends when there's less traffic. |
40 | 51 |
|
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. |
| 52 | +:::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"::: |
43 | 53 |
|
44 |
| -[](./media/autoscale-common-scale-patterns/scale-for-holiday.png#lightbox) |
| 54 | +## Scale differently during specific events |
45 | 55 |
|
46 |
| -## Scale based on custom metric |
| 56 | +You can set your scale rules and instance limits differently for specific events. |
| 57 | +For example: |
| 58 | +- Set a minimum of 3 instances by default |
| 59 | +- For the week of Back Friday, set the minimum number of instances to 10 to handle the anticipated traffic. |
47 | 60 |
|
48 |
| -You have a web front end and an API tier that communicates with the backend. |
| 61 | +:::image type="content" source="./media/autoscale-common-scale-patterns/scale-for-event.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-event.png"::: |
49 | 62 |
|
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) |
| 63 | +## Scale based on custom metrics |
| 64 | +Scale by custom metrics generated by your application. |
| 65 | +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. |
51 | 66 |
|
52 |
| -![Scale based on custom metric][5] |
| 67 | +:::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"::: |
53 | 68 |
|
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 |
| 69 | +Next steps |
| 70 | + |
| 71 | +Learn more about autoscale by referring to the following articles : |
| 72 | + |
| 73 | +* [Azure Monitor autoscale common metrics](./autoscale-common-metrics.md) |
| 74 | +* [Azure Monitor autoscale custom metrics](./autoscale-custom-metric.md) |
| 75 | +* [Autoscale with multiple profiles](./autoscale-multiprofile.md) |
| 76 | +* [Flapping in Autoscale](./autoscale-custom-metric.md) |
| 77 | +* [Use autoscale actions to send email and webhook alert notifications](./autoscale-webhook-email.md) |
| 78 | +* [Autoscale REST API](/rest/api/monitor/autoscalesettings) |
0 commit comments