In the Azure Portal Preview, you can manually set the instance count of your Web Hosting Plan, or, you can set parameters to have it automatically scale. Before you configure scaling for your Web Hosting Plan, you should consider that scaling is affected by instance size. Larger sizes have more cores and memory, and so they will have better performance for the same number of instances.
Scale affects an entire Web Hosting Plan. When you create a Website you have the option to create a new Web Hosting Plan or an existing Web Hosting Plan. Once you have a Web Hosting Plan, all of the sites will share the same instances, so they all scale together.
Clicking on the part will take you to the Scale blade. At the top of the scale blade you can see a history of autoscale actions for your Web Hosting Plan.
You can manually adjust the number of virtual machines that run your Web Hosting Plan with the Instance slider.
If you want the number of instances to automatically adjust based on load, select Performance under Autoscale Mode. At this time you cannot select Schedule in the Azure Portal Preview.
Once you select Performance, there are two changes:
The CPU Percentage section allows you to set a target for the average CPU across all of the instances in your Web Hosting Plan. A scale up will happen when the average CPU exceeds the maximum you define.
With auto scale enabled, you'll see Performance in the part on the Website blade, and, you'll see your scale history in the chart:
Note that in the Azure Portal Preview, you cannot change the number of instances of a Shared Web Hosting Plan.
New in the Azure Portal Preview, you can scale based on metrics other than CPU Percentage, and can even have a complex set of scale up and scale down rules.
In addition to CPU, you can scale based on:
There are two different ways to scale by another metric. If you want to only scale by a single metric, select the chevron next to the CPU Percentage slider. This will open the Metric Details blade:
To scale by more than one metric at a time, you can click Add Metric in the command bar:
The Metric Detail blade contains all of the controls that you need to set up your optimal scale profile. At the top, choose the new metric that you want to scale by.
Below the graph of the metric are two sections: Scale up rules and Scale down rules. Your service will scale up if any of the scale up rules are met. Conversely, your service will scale down if all of the scale down rules are met.
For each rule you choose:
With multiple scale rules, you can be more agressive about scaling up (or down) as performance changes. For example, you can define two scale rules:
With this additional rule, if your load exceeds 85% before a scale action, you will get two additional instances instead of one.