Skip to content

Latest commit

 

History

History
138 lines (100 loc) · 6.72 KB

monitoring-autoscale-get-started.md

File metadata and controls

138 lines (100 loc) · 6.72 KB
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

Get started with Autoscale in Azure

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.

Discover the Autoscale settings in your subscription

You can discover all the resources for which Autoscale is applicable in Azure Monitor. Use the following steps for a step-by-step walkthrough:

  1. Open the Azure portal.
  2. Click the Azure Monitor icon in the left pane. Open Azure Monitor
  3. Click Autoscale to view all the resources for which Autoscale is applicable, along with their current Autoscale status. Discover Autoscale in Azure Monitor

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.

Create your first Autoscale setting

Let's now go through a simple step-by-step walkthrough to create your first Autoscale setting.

  1. 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.)

  2. Note that the current instance count is 1. Click Enable autoscale. Scale setting for new web app

  3. 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. Create scale setting for a web app

  4. 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. Scale based on CPU

  5. 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.

Other considerations

Scale based on a schedule

In addition to scale based on CPU, you can set your scale differently for specific days of the week.

  1. Click Add a scale condition.
  2. Setting the scale mode and the rules is the same as the default condition.
  3. Select Repeat specific days for the schedule.
  4. Select the days and the start/end time for when the scale condition should be applied.

Scale condition based on schedule

Scale differently on specific dates

In addition to scale based on CPU, you can set your scale differently for specific dates.

  1. Click Add a scale condition.
  2. Setting the scale mode and the rules is the same as the default condition.
  3. Select Specify start/end dates for the schedule.
  4. Select the start/end dates and the start/end time for when the scale condition should be applied.

Scale condition based on dates

View the scale history of your resource

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.

Run history

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.

View the scale definition of your resource

Autoscale is an Azure Resource Manager resource. You can view the scale definition in JSON by switching to the JSON tab.

Scale definition

You can make changes in JSON directly, if required. These changes will be reflected after you save them.

Disable Autoscale and manually scale your instances

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. Disable Autoscale

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.

Set manual scale

You can always return to Autoscale by clicking Enable autoscale and then Save.

Next steps