Defining Scale Groups
Scale groups are a convenience that enables you to define autoscaling rules that target multiple roles. This will help you minimize the number of autoscaling rules that you must create and manage. When you specify the target of an autoscaling rule, you can identify a scale group instead of an individual role. A scale group can contain any number of roles.
The following sample from a service information configuration file shows the definition of a scale group that contains three roles.
<scaleGroups> <scaleGroup name="ScaleGroupA"> <roles> <role name="Fabrikam.Billing" ratio="3"/> <role name="Fabrikam.BillProcessor" ratio="2"/> <role name="Fabrikam.InvoiceReporting" ratio="1"/> </roles> </scaleGroup> </scaleGroups>
The following sample shows a rule that uses the scale group as a target.
<rule name="Scalegroup Peak Time" description="" rank="10" enabled="true"> <timetable startTime="16:05:00" duration="02:00:00" utcOffset="-06:00"> <relativeMonthly dayOfWeek="Monday" position="Last"/> </timetable> <actions> <range target="ScaleGroupA" min="3" max="6"/> </actions> </rule>
In the scale group definition, each role is assigned a ratio. The scaler uses these ratios to calculate the new instance count for the role whenever a scaling operation takes place. The following table shows how the calculation performed is different depending on the rule definition.
Rule and action type
Effective minimum role instance count = Minimum instance count in rule * Ratio
Effective maximum role instance count = Maximum instance count in rule * Ratio
Reactive rule with an action that increments the instance count
New role instance count = Current role instance count + (Increment * Ratio)
Reactive rule with an action that adjusts the instance count proportionally
New role instance count = Current role instance count + (Current role instance count * Increment * Ratio)
|The new role instance count, as calculated by a reactive rule, is always limited by any constraint rules that apply to the role.|
For examples of scale groups and instance count calculations, see the section "Scale Groups" in chapter "Autoscaling and Windows Azure" of the Developer's Guide.
A role could be the target of two or more rules: either because the rules use the role as a target directly, or because the role is a member of multiple scale groups, or because the rules use the same scale group. In this case, the Autoscaling Application Block use the rule ranks to determine which rule takes precedence.
Last built: June 7, 2012