title | description | author | manager | editor | services | documentationcenter | ms.assetid | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Get started with Autoscale in Azure | Microsoft Docs |
Learn how to scale your resource in Azure. |
rajram |
rboucher |
monitoring-and-diagnostics |
monitoring-and-diagnostics |
d37d3fda-8ef1-477c-a360-a855b418de84 |
monitoring-and-diagnostics |
na |
na |
na |
article |
07/07/2017 |
rajram |
This article describes how to set up your Autoscale settings for your resource in the Microsoft Azure portal.
Azure Monitor Autoscale applies only to virtual machine scale sets, cloud services, Azure App Service plans, and App Service environments.
You can discover all the resources for which Autoscale is applicable in Azure Monitor. Use the following steps for a step-by-step walkthrough:
- Open the Azure portal.
- Click the Azure Monitor icon in the left pane.
- Click Autoscale to view all the resources for which Autoscale is applicable, along with their current Autoscale status.
You can use the filter pane at the top to scope down the list to select resources in a specific resource group, specific resource types, or a specific resource.
For each resource, you will find the current instance count and the Autoscale status. The Autoscale status can be:
- Not configured: You have not enabled Autoscale yet for this resource.
- Enabled: You have enabled Autoscale for this resource.
- Disabled: You have disabled Autoscale for this resource.
Let's now go through a simple step-by-step walkthrough to create your first Autoscale setting.
-
Open the Autoscale blade in Azure Monitor and select a resource that you want to scale. (The following steps use an App Service plan associated with a web app. You can create your first ASP.NET web app in Azure in 5 minutes.)
-
Note that the current instance count is 1. Click Enable autoscale.
-
Provide a name for the scale setting, and then click Add a rule. Notice the scale rule options that open as a context pane on the right side. By default, this sets the option to scale your instance count by 1 if the CPU percentage of the resource exceeds 70 percent. Leave it at its default values and click Add.
-
You've now created your first scale rule. Note that the UX recommends best practices and states that "It is recommended to have at least one scale in rule." To do so:
a. Click Add a rule.
b. Set Operator to Less than.
c. Set Threshold to 20.
d. Set Operation to Decrease count by.
You should now have a scale setting that scales out/scales in based on CPU usage.
-
Click Save.
Congratulations! You've now successfully created your first scale setting to autoscale your web app based on CPU usage.
Note
The same steps are applicable to get started with a virtual machine scale set or cloud service role.
In addition to scale based on CPU, you can set your scale differently for specific days of the week.
- Click Add a scale condition.
- Setting the scale mode and the rules is the same as the default condition.
- Select Repeat specific days for the schedule.
- Select the days and the start/end time for when the scale condition should be applied.
In addition to scale based on CPU, you can set your scale differently for specific dates.
- Click Add a scale condition.
- Setting the scale mode and the rules is the same as the default condition.
- Select Specify start/end dates for the schedule.
- Select the start/end dates and the start/end time for when the scale condition should be applied.
Whenever your resource is scaled up or down, an event is logged in the activity log. You can view the scale history of your resource for the past 24 hours by switching to the Run history tab.
If you want to view the complete scale history (for up to 90 days), select Click here to see more details. The activity log opens, with Autoscale pre-selected for your resource and category.
Autoscale is an Azure Resource Manager resource. You can view the scale definition in JSON by switching to the JSON tab.
You can make changes in JSON directly, if required. These changes will be reflected after you save them.
There might be times when you want to disable your current scale setting and manually scale your resource.
Click the Disable autoscale button at the top.
Note
This option disables your configuration. However, you can get back to it after you enable Autoscale again.
You can now set the number of instances that you want to scale to manually.
You can always return to Autoscale by clicking Enable autoscale and then Save.