On the Build conference Microsoft announced a new feature called auto-scaling. This enables you to setup automatic scale rules based on the activity of your instances – allowing you to automatically scale down (and save money) when they are below a CPU threshold you define, and automatically scale up quickly when traffic increases.
The auto-scaling feature is also available for Cloud Services and Virtual Machines, but in this post I’m only going to talk about Azure Web Sites.
To set up a new rule you log in to the portal. Go to the web site you want to automatically scale and click on the tab “Scale”. The feature is only available in the STANDARD mode.
In the picture below I configured my test website (called “autoscale”) to use a minimum of 1 instance and a maximum of 4 instances.
The Target CPU slides says it will scale up when the average CPU utilization comes above 75 percent and will scale down an instance if the utilization drops below 30 percent.
In the gray box you can read “Autoscale has reduced your costs by up to 50%“. This is Microsofts way of saying that you’re using 2 instances (50% of my maximum of 4).
In the graph you can see I have been testing the service by doing some load test on the site. In general the autoscaling feature worked great. Only thing I noticed is that it sometimes takes up to 30 minutes before the site scaled up.