Question

Difficulty: EasyConfigure Azure Monitor Autoscale Rules and Metrics

You are configuring metric-based autoscale rules for an Azure App Service plan that currently runs on 11 instance. To prevent metric flapping when scaling between 11 and 22 instances, you need to set appropriate scale-out and scale-in thresholds. Which two of the following threshold configurations, based on the Average CPU percentage metric, will prevent flapping?

  1. Scale-out when CPU percentage is greater than 80%80\%; scale-in when CPU percentage is less than 35%35\%Answer
  2. B
    Scale-out when CPU percentage is greater than 80%80\%; scale-in when CPU percentage is less than 45%45\%
  3. Scale-out when CPU percentage is greater than 70%70\%; scale-in when CPU percentage is less than 30%30\%Answer
  4. D
    Scale-out when CPU percentage is greater than 70%70\%; scale-in when CPU percentage is less than 60%60\%

Answer

The correct threshold configurations are a scale-out threshold of 80%80\% with a scale-in threshold of 35%35\%, and a scale-out threshold of 70%70\% with a scale-in threshold of 30%30\%.
The configurations specifying a scale-out threshold of 80%80\% with a scale-in threshold of 35%35\%, and a scale-out threshold of 70%70\% with a scale-in threshold of 30%30\%, prevent flapping. This is because scaling from 11 to 22 instances divides the workload in half. For a scale-out threshold of 80%80\%, the CPU load drops to approximately 40%40\%, which is safely above the scale-in threshold of 35%35\%. For a scale-out threshold of 70%70\%, the CPU load drops to approximately 35%35\%, which is safely above the scale-in threshold of 30%30\%.

Step-by-Step Solution

1
Analyze how the CPU load is distributed when scaling out from 11 to 22 instances.
The average CPU load per instance is halved because the workload is divided equally between 22 instances.
To determine the new CPU level after a scale-out action occurs at or just above the scale-out threshold.
2
Calculate the new CPU level after scaling out for a scale-out threshold of 80%80\% and 70%70\%.
For an 80%80\% threshold, the new CPU is 80%/2=40%80\% / 2 = 40\%. For a 70%70\% threshold, the new CPU is 70%/2=35%70\% / 2 = 35\%.
To identify the minimum post-scale-out CPU percentage that will be observed on the instances.
3
Compare the post-scale-out CPU level to the scale-in threshold for each configuration.
For the configuration with scale-out 80%80\% and scale-in 35%35\%, 40%>35%40\% > 35\% (no flapping). For scale-out 70%70\% and scale-in 30%30\%, 35%>30%35\% > 30\% (no flapping). The other configurations have scale-in thresholds (45%45\% and 60%60\%) higher than the post-scale-out levels, which triggers immediate scale-in (flapping).
To select the configurations where the scale-in threshold is lower than the new CPU load, avoiding immediate scale-in.

Key Concept

Configuring scale-out and scale-in thresholds with a sufficient margin to prevent metric flapping when resource count changes.
Rate this question