Question

Difficulty: HardConfigure Azure Monitor Autoscale Rules and Metrics

You are configuring Azure Monitor autoscale rules for an Azure App Service plan named `asp-payment` that currently runs a critical web API on 44 instances. The minimum instance count is configured as 44, and the maximum is 1010.

You have already configured the scale-out rule as follows:
* Metric: CPU Percentage
* Time aggregation: Average
* Duration (Time window): 1010 minutes
* Operator: Greater than
* Threshold: 75%75\%
* Operation: Increase count by 22

You need to configure the scale-in rule to decrease the instance count by 11 when the workload decreases, while ensuring that the configuration does not cause autoscale flapping under a constant workload.

Which of the following configurations should you select? (Select TWO)

  1. A scale-in threshold of 45%45\% CPU percentage.Answer
  2. B
    A scale-in threshold of 55%55\% CPU percentage.
  3. Set the scale-in metric statistic (instance aggregation) to Average.Answer
  4. D
    Set the scale-in metric statistic (instance aggregation) to Maximum.

Answer

Select a scale-in threshold of 45%45\% CPU percentage and set the scale-in metric statistic to Average.
The correct options are selecting a scale-in threshold of 45%45\% CPU percentage and setting the metric statistic to Average. Under a constant workload of 300%300\% CPU (derived from 44 instances running at 75%75\% CPU), scaling out by 22 instances increases the total instances to 66, reducing the average CPU to 50%50\%. A scale-in threshold of 45%45\% (which is below 50%50\%) ensures the rule does not immediately trigger. Selecting the Average metric statistic ensures that the autoscale engine evaluates the overall cluster load consistently across both scale-out and scale-in rules.

Step-by-Step Solution

1
Calculate the total workload at the scale-out threshold.
The total workload is calculated as: 44 instances ×75%=300%\times 75\% = 300\% CPU equivalent.
To find the average CPU per instance after a scale-out event occurs under the same workload.
2
Calculate the new average CPU percentage per instance after scaling out.
The new instance count is 4+2=64 + 2 = 6. The new average CPU per instance is: 300%6=50%\frac{300\%}{6} = 50\%.
The scale-in threshold must be set below this value to prevent the scale-in rule from triggering immediately after a scale-out.
3
Determine the maximum threshold for scale-in to prevent flapping.
The scale-in threshold must be strictly less than 50%50\% (e.g., 45%45\%) and the metric statistic must be set to Average to maintain consistency with the scale-out rule.
Setting the threshold to 55%55\% causes immediate scale-in when CPU drops to 50%50\%, leading to flapping. Setting the metric statistic to Average ensures the rule aggregates CPU across all instances correctly.

Key Concept

Autoscale flapping occurs when a scale-out action immediately satisfies the condition for a scale-in action (or vice versa) under a constant workload. To prevent this, the scale-in threshold must be set lower than the average load on the expanded scale set.
Rate this question