共用方式為


Understanding Rule Ranks and Reconciliation

Retired Content

This content and the technology described is outdated and is no longer being maintained. For more information, see Transient Fault Handling.

patterns & practices Developer Center

On this page:
Conflicting Constraint Rule and Reactive Rule | Overlapping Constraint Rules | Conflicting Reactive Rules | Conflicting Actions on Target Role Instances and Scale Groups

There are a number of scenarios in which multiple rules can give rise to conflicting actions. This section describes what will happen if these scenarios arise in the rules that you specify for your application.

Conflicting Constraint Rule and Reactive Rule

A constraint rule always overrides a reactive rule. The range rule sets that absolute minimum required number of target instances, and the absolute maximum permitted number of target instances.

Note

Use the minimum number of target instances to protect your SLA, and the maximum number of target instances to limit your costs.

Overlapping Constraint Rules

Two or more constraint rules could include timetables that specify that they are active at the same time. The following table shows two partially overlapping range rules.

Rule Identifier

Timetable

Minimum

Maximum

Rank

A

Every Monday

3

6

5

B

Daily between 09:00 and 11:00

4

8

10

In this scenario, the rule with the highest rank wins, so on Mondays between 09:00 and 11:00 the minimum number of instances is four and the maximum is eight.

If two constraint rules of the same rank conflict, the block will use the action from the first constraint rule that it finds.

Conflicting Reactive Rules

Two or more reactive rules could result in conflicting suggested changes to the number of target instances. If this is the case, then the Autoscaling Application Block uses the following logic to reconcile the conflict.

  • The rule with the highest rank wins.
  • If two or more rules share the same highest rank, then if any of those rules suggest an increase in the number of target instances, then the largest increase is used. For example, if one rule suggests increasing the number of target instances by one, another suggests increasing the number by three, and another suggests decreasing the number by one, then the number of instances will be increased by three.
  • If two or more rules share the same highest rank, then if any of those rules suggest a decrease in the number of target role instances, then the smallest decrease is used. For example, if one rule suggests decreasing the number of target instances by one, and the other suggests decreasing the number by three, then the number of instances will be decreased by one.

Conflicting Actions on Target Role Instances and Scale Groups

A reactive rule can have an action that operates on a target role or on a scale group. It is possible that multiple rules could suggest different scaling actions on the same target at the same time, either because two actions target the same role directly or because a role is a member of a scale group and one action targets the role directly, and one targets the scale group of which the target is a member. If this is the case, and the two actions propose different scaling values, then the Autoscaling Application Block uses the same reconciliation logic that it uses in the case of conflicting reactive rules.

Next Topic | Previous Topic | Home

Last built: June 7, 2012