Today’s (Cloud) Tip…

Did you know that you can configure your Cloud Services to scale up and down based on load? AutoScale enables you to configure Windows Azure to automatically scale your application dynamically on your behalf (without any manual intervention required) so that you can achieve the ideal performance and cost balance. Once configured, AutoScale will regularly adjust the number of instances running in response to the load in your application.

Schedule AutoScale Rules

If you click on the Scale tab of a Cloud Service, you’ll see that we have support for you to configure/control different scaling rules based on schedule rules.

By default, you’ll edit scale settings for No scheduled times – this means that your scale settings will always be the same regardless of the time/day. You can scale manually by selecting None in the Scale by Metric section – this will give you the traditional Instance Count slider that you are familiar with:


Or you can AutoScale dynamically by reacting to CPU activity or Queue Depth.  The below screen-shot demonstrates configuring an auto-scale rule based on the CPU of the WebTier role and indicates to scale between 1 and 3 instances – depending on the aggregate CPU:


We also allow you to setup different scale settings for different times of the day.  You can enable this by clicking the “Set up Schedule Times” button above.  This brings up a new dialog:


We also offer the ability to define two different recurring schedules: Day and Night. The first schedule, Day Time, runs from the start of the day to the end of the day (defined above as being between 8am and 8pm). The second schedule, Night Time, runs from the end of one day to the start of the next day. Both use the options in Time to define start and end of a day, and the time zone. This schedule respects daylight savings time, if it is applicable to that timezone.

Once you’ve setup a day/night schedule, you can return to the Scale page and see that the schedule dropdown now has the two schedules you created populated within it:


You can now select each schedule from the list and edit scaling rules specific to it within it. For example, you can select the Day Time Schedule and set Instance Count on a Cloud Service role to 5, and then select Night Time and set Instance Count to 3.  This will ensure that Windows Azure scales up your service to 5 instances during the day, and then cycles them down to 3 instances overnight.

You can also combine Scheduled Autoscale rules and the Metric Based AutoScale rules together.  Select the CPU or Queue toggle and you can configure AutoScale rules that apply differently during the day or night. For example, you could set the Instance Range from 5 to 10 during the day, and 3 to 6 at night based on CPU activity.