Skip to content

Commit 11e7679

Browse files
authored
Merge pull request #205810 from EdB-MSFT/update-autoscale-overview
Refresh Autoscale Overview
2 parents c3f08ab + ed3bf37 commit 11e7679

File tree

3 files changed

+74
-54
lines changed

3 files changed

+74
-54
lines changed
Lines changed: 74 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,122 @@
11
---
22
title: Autoscale in Microsoft Azure
33
description: "Autoscale in Microsoft Azure"
4+
author: EdB-MSFT
5+
ms.author: edbaynash
6+
ms.service: azure-monitor
47
ms.subservice: autoscale
58
ms.topic: conceptual
6-
ms.date: 04/22/2022
9+
ms.date: 08/01/2022
710
ms.reviewer: riroloff
811

912
---
1013

1114
# Overview of autoscale in Microsoft Azure
12-
This article describes what Microsoft Azure autoscale is, its benefits, and how to get started using it.
15+
This article describes Microsoft Azure autoscale and its benefits.
1316

14-
Azure autoscale supports a growing list of resource types. See the list of [supported resources](#supported-services-for-autoscale) for more details.
17+
Azure autoscale supports many resource types. For more information about supported resources, see [autoscale supported resources](#supported-services-for-autoscale).
1518

1619
> [!NOTE]
17-
> Azure has two autoscale methods. An older version of autoscale applies to Virtual Machines (availability sets). This feature has limited support and we recommend migrating to virtual machine scale sets for faster and more reliable autoscale support. A link on how to use the older technology is included in this article.
18-
>
20+
> [Availability sets](/archive/blogs/kaevans/autoscaling-azurevirtual-machines) are an older scaling feature for virtual machines with limited support. We recommend migrating to [virtual machine scale sets](/azure/virtual-machine-scale-sets/overview) for faster and more reliable autoscale support.
1921
20-
## What is autoscale?
21-
Autoscale allows you to have the right amount of resources running to handle the load on your application. It allows you to add resources to handle increases in load and also save money by removing resources that are sitting idle. You specify a minimum and maximum number of instances to run and add or remove VMs automatically based on a set of rules. Having a minimum makes sure your application is always running even under no load. Having a maximum limits your total possible hourly cost. You automatically scale between these two extremes using rules you create.
2222

23-
![Autoscale explained. Add and remove VMs](./media/autoscale-overview/AutoscaleConcept.png)
23+
## What is autoscale
24+
Autoscale is a service that allows you to automatically add and remove resources according to the load on your application.
2425

25-
When rule conditions are met, one or more autoscale actions are triggered. You can add and remove VMs, or perform other actions. The following conceptual diagram shows this process.
26+
When your application experiences higher load, autoscale adds resources to handle the increased load. When load is low, autoscale reduces the number of resources, lowering your costs. You can scale your application based on metrics like CPU usage, queue length, and available memory, or based on a schedule. Metrics and schedules are set up in rules. The rules include a minimum level of resources that you need to run your application, and a maximum level of resources that won't be exceeded.
2627

27-
![Autoscale Flow Diagram](./media/autoscale-overview/Autoscale_Overview_v4.png)
28+
For example, scale out your application by adding VMs when the average CPU usage per VM is above 70%. Scale it back in removing VMs when CPU usage drops to 40%.
2829

29-
The following explanation applies to the pieces of the previous diagram.
30+
![Autoscale explained. Add and remove VMs](./media/autoscale-overview/AutoscaleConcept.png)
3031

31-
## Resource Metrics
32-
Resources emit metrics, these metrics are later processed by rules. Metrics come via different methods.
33-
Virtual machine scale sets use telemetry data from Azure diagnostics agents whereas telemetry for Web apps and Cloud services comes directly from the Azure Infrastructure. Some commonly used statistics include CPU Usage, memory usage, thread counts, queue length, and disk usage. For a list of what telemetry data you can use, see [Autoscale Common Metrics](autoscale-common-metrics.md).
32+
When the conditions in the rules are met, one or more autoscale actions are triggered, adding or removing VMs. In addition, you can perform other actions like sending email notifications, or webhooks to trigger processes in other systems..
33+
### Predictive autoscale (preview)
34+
[Predictive autoscale](/azure/azure-monitor/autoscale/autoscale-predictive) uses machine learning to help manage and scale Azure virtual machine scale sets with cyclical workload patterns. It forecasts the overall CPU load on your virtual machine scale set, based on historical CPU usage patterns. The scale set can then be scaled out in time to meet the predicted demand.
35+
## Autoscale setup
36+
You can set up autoscale via:
37+
* [Azure portal](autoscale-get-started.md)
38+
* [PowerShell](../powershell-samples.md#create-and-manage-autoscale-settings)
39+
* [Cross-platform Command Line Interface (CLI)](../cli-samples.md#autoscale)
40+
* [Azure Monitor REST API](/rest/api/monitor/autoscalesettings)
3441

35-
## Custom Metrics
36-
You can also use your own custom metrics that your application(s) may be emitting. If you've configured your application(s) to send metrics to Application Insights you can use those metrics to make decisions on whether to scale or not.
42+
## Architecture
43+
The following diagram shows the autoscale architecture.
3744

38-
## Time
39-
Schedule-based rules are based on UTC. You must set your time zone properly when setting up your rules.
45+
![Autoscale Flow Diagram](./media/autoscale-overview/Autoscale_Overview_v4.png)
4046

41-
## Rules
42-
The diagram shows only one autoscale rule, but you can have many of them. You can create complex overlapping rules as needed for your situation. Rule types include
47+
### Resource metrics
48+
Resources generate metrics that are used in autoscale rules to trigger scale events. Virtual machine scale sets use telemetry data from Azure diagnostics agents to generate metrics. Telemetry for Web apps and Cloud services comes directly from the Azure Infrastructure.
4349

44-
* **Metric-based** - For example, do this action when CPU usage is above 50%.
45-
* **Time-based** - For example, trigger a webhook every 8am on Saturday in a given time zone.
50+
Some commonly used metrics include CPU usage, memory usage, thread counts, queue length, and disk usage. See [Autoscale Common Metrics](autoscale-common-metrics.md) for a list of available metrics.
4651

47-
Metric-based rules measure application load and add or remove VMs based on that load. Schedule-based rules allow you to scale when you see time patterns in your load and want to scale before a possible load increase or decrease occurs.
52+
### Custom metrics
53+
Use your own custom metrics that your application generates. Configure your application to send metrics to [Application Insights](/azure/azure-monitor/app/app-insights-overview) so you can use those metrics decide when to scale.
4854

49-
## Actions and automation
50-
Rules can trigger one or more types of actions.
55+
### Time
56+
Set up schedule-based rules to trigger scale events. Use schedule-based rules when you see time patterns in your load, and want to scale before an anticipated change in load occurs.
57+
5158

52-
* **Scale** - Scale VMs in or out
53-
* **Email** - Send email to subscription admins, co-admins, and/or additional email address you specify
54-
* **Automate via webhooks** - Call webhooks, which can trigger multiple complex actions inside or outside Azure. Inside Azure, you can start an Azure Automation runbook, Azure Function, or Azure Logic App. Example third-party URL outside Azure include services like Slack and Twilio.
59+
### Rules
60+
Rules define the conditions needed to trigger a scale event, the direction of the scaling, and the amount to scale by. Rules can be:
61+
* Metric-based
62+
Trigger based on a metric value, for example when CPU usage is above 50%.
63+
* Time-based
64+
Trigger based on a schedule, for example, every Saturday at 8am.
5565

56-
## Autoscale Settings
57-
Autoscale use the following terminology and structure.
5866

59-
- An **autoscale setting** is read by the autoscale engine to determine whether to scale up or down. It contains one or more profiles, information about the target resource, and notification settings.
67+
You can combine multiple rules using different metrics, for example CPU usage and queue length.
68+
* The OR operator is used when scaling out with multiple rules.
69+
* The AND operator is used when scaling in with multiple rules.
6070

61-
- An **autoscale profile** is a combination of a:
71+
### Actions and automation
72+
Rules can trigger one or more actions. Actions include:
6273

63-
- **capacity setting**, which indicates the minimum, maximum, and default values for number of instances.
64-
- **set of rules**, each of which includes a trigger (time or metric) and a scale action (up or down).
65-
- **recurrence**, which indicates when autoscale should put this profile into effect.
74+
- Scale - Scale resources in or out.
75+
- Email - Send an email to the subscription admins, co-admins, and/or any other email address.
76+
- Webhooks - Call webhooks to trigger multiple complex actions inside or outside Azure. In Azure, you can:
77+
+ Start an [Azure Automation runbook](/azure/automation/overview).
78+
+ Call an [Azure Function](/azure/azure-functions/functions-overview).
79+
+ Trigger an [Azure Logic App](/azure/logic-apps/logic-apps-overview).
80+
## Autoscale settings
6681

67-
You can have multiple profiles, which allow you to take care of different overlapping requirements. You can have different autoscale profiles for different times of day or days of the week, for example.
82+
Autoscale settings contain the autoscale configuration. The setting including scale conditions that define rules, limits, and schedules and notifications. Define one or more scale conditions in the settings, and one notification setup.
6883

69-
- A **notification setting** defines what notifications should occur when an autoscale event occurs based on satisfying the criteria of one of the autoscale setting’s profiles. Autoscale can notify one or more email addresses or make calls to one or more webhooks.
84+
Autoscale uses the following terminology and structure. The UI and JSON
7085

86+
| UI | JSON/CLI | Description |
87+
|------------------|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
88+
| Scale conditions | profiles | A collection of rules, instance limits and schedules, based on a metric or time. You can define one or more scale conditions or profiles. |
89+
| Rules | rules | A set of time or metric-based conditions that trigger a scale action. You can define one or more rules for both scale in and scale out actions. |
90+
| Instance limits | capacity | Each scale condition or profile defines th default, max, and min number of instances that can run under that profile. |
91+
| Schedule | recurrence | Indicates when autoscale should put this scale condition or profile into effect. You can have multiple scale conditions, which allow you to handle different and overlapping requirements. For example, you can have different scale conditions for different times of day, or days of the week. |
92+
| Notify | notification | Defines the notifications to send when an autoscale event occurs. Autoscale can notify one or more email addresses or make a call one or more webhooks. You can configure multiple webhooks in the JSON but only one in the UI. |
7193

72-
![Azure autoscale setting, profile, and rule structure](./media/autoscale-overview/AzureResourceManagerRuleStructure3.png)
94+
![Azure autoscale setting, profile, and rule structure](./media/autoscale-overview/azure-resource-manager-rule-structure-3.png)
7395

7496
The full list of configurable fields and descriptions is available in the [Autoscale REST API](/rest/api/monitor/autoscalesettings).
7597

7698
For code examples, see
7799

78-
* [Advanced Autoscale configuration using Resource Manager templates for VM Scale Sets](autoscale-virtual-machine-scale-sets.md)
100+
* [Advanced Autoscale configuration using Resource Manager templates for virtual machine scale sets](autoscale-virtual-machine-scale-sets.md)
79101
* [Autoscale REST API](/rest/api/monitor/autoscalesettings)
80102

81103
## Horizontal vs vertical scaling
82-
Autoscale only scales horizontally, which is an increase ("out") or decrease ("in") in the number of VM instances. Horizontal is more flexible in a cloud situation as it allows you to run potentially thousands of VMs to handle load.
104+
Autoscale scales horizontally, which is an increase, or decrease of the number of resource instances. For example, in a virtual machine scale set, scaling out means adding more virtual machines Scaling in means removing virtual machines. Horizontal scaling is flexible in a cloud situation as it allows you to run a large number of VMs to handle load.
83105

84-
In contrast, vertical scaling is different. It keeps the same number of VMs, but makes the VMs more ("up") or less ("down") powerful. Power is measured in memory, CPU speed, disk space, etc. Vertical scaling has more limitations. It's dependent on the availability of larger hardware, which quickly hits an upper limit and can vary by region. Vertical scaling also usually requires a VM to stop and restart.
106+
In contrast, vertical scaling, keeps the same number of resources constant, but gives them more capacity in terms of memory, CPU speed, disk space and network. Adding or removing capacity in vertical scaling is known as scaling or down. Vertical scaling is limited by the availability of larger hardware, which eventually reaches an upper limit. Hardware size availability varies in Azure by region. Vertical scaling may also require a restart of the virtual machine during the scaling process.
85107

86-
## Methods of access
87-
You can set up autoscale via
88108

89-
* [Azure portal](autoscale-get-started.md)
90-
* [PowerShell](../powershell-samples.md#create-and-manage-autoscale-settings)
91-
* [Cross-platform Command Line Interface (CLI)](../cli-samples.md#autoscale)
92-
* [Azure Monitor REST API](/rest/api/monitor/autoscalesettings)
93109

94110
## Supported services for autoscale
95-
| Service | Schema & Docs |
111+
The following services are supported by autoscale:
112+
113+
| Service | Schema & Documentation |
96114
| --- | --- |
97115
| Web Apps |[Scaling Web Apps](autoscale-get-started.md) |
98116
| Cloud Services |[Autoscale a Cloud Service](../../cloud-services/cloud-services-how-to-scale-portal.md) |
99-
| Virtual Machines: Classic |[Scaling Classic Virtual Machine Availability Sets](/archive/blogs/kaevans/autoscaling-azurevirtual-machines) |
100-
| Virtual Machines: Windows Scale Sets |[Scaling virtual machine scale sets in Windows](../../virtual-machine-scale-sets/tutorial-autoscale-powershell.md) |
101-
| Virtual Machines: Linux Scale Sets |[Scaling virtual machine scale sets in Linux](../../virtual-machine-scale-sets/tutorial-autoscale-cli.md) |
102-
| Virtual Machines: Windows Example |[Advanced Autoscale configuration using Resource Manager templates for VM Scale Sets](autoscale-virtual-machine-scale-sets.md) |
117+
| Virtual Machines: Windows scale sets |[Scaling virtual machine scale sets in Windows](../../virtual-machine-scale-sets/tutorial-autoscale-powershell.md) |
118+
| Virtual Machines: Linux scale sets |[Scaling virtual machine scale sets in Linux](../../virtual-machine-scale-sets/tutorial-autoscale-cli.md) |
119+
| Virtual Machines: Windows Example |[Advanced Autoscale configuration using Resource Manager templates for virtual machine scale sets](autoscale-virtual-machine-scale-sets.md) |
103120
| Azure App Service |[Scale up an app in Azure App service](../../app-service/manage-scale-up.md)|
104121
| API Management service|[Automatically scale an Azure API Management instance](../../api-management/api-management-howto-autoscale.md)
105122
| Azure Data Explorer Clusters|[Manage Azure Data Explorer clusters scaling to accommodate changing demand](/azure/data-explorer/manage-cluster-horizontal-scaling)|
@@ -116,10 +133,13 @@ You can set up autoscale via
116133

117134

118135
## Next steps
119-
To learn more about autoscale, use the Autoscale Walkthroughs listed previously or refer to the following resources:
136+
To learn more about autoscale, see the following resources:
120137

121138
* [Azure Monitor autoscale common metrics](autoscale-common-metrics.md)
139+
* [Scale virtual machine scale sets](/azure/virtual-machine-scale-sets/tutorial-autoscale-powershell?toc=/azure/azure-monitor/toc.json)
140+
* [Autoscale using Resource Manager templates for virtual machine scale sets](/azure/virtual-machine-scale-sets/tutorial-autoscale-powershell?toc=/azure/azure-monitor/toc.json)
122141
* [Best practices for Azure Monitor autoscale](autoscale-best-practices.md)
123142
* [Use autoscale actions to send email and webhook alert notifications](autoscale-webhook-email.md)
124143
* [Autoscale REST API](/rest/api/monitor/autoscalesettings)
125-
* [Troubleshooting Virtual Machine Scale Sets Autoscale](../../virtual-machine-scale-sets/virtual-machine-scale-sets-troubleshoot.md)
144+
* [Troubleshooting virtual machine scale sets and autoscale](../../virtual-machine-scale-sets/virtual-machine-scale-sets-troubleshoot.md)
145+
* [Troubleshooting Azure Monitor autoscale](/azure/azure-monitor/autoscale/autoscale-troubleshoot)
19.6 KB
Loading

0 commit comments

Comments
 (0)