Soru

Zorluk: ZorScale Azure App Service Web Apps

A telemetry processing service is hosted on an Azure App Service Web App running on a Standard (S1) App Service plan. The autoscale setting is configured to scale out by 1 instance when the average CPU Percentage is greater than 80% for 10 minutes. The instance limits are set to a minimum of 1, a default of 2, and a maximum of 4 instances. You want to configure the scale-in rule to decrease the instance count by 1 instance when CPU load drops, while preventing autoscale flapping.

Which scale-in threshold for the CPU Percentage metric should you configure to meet this requirement?

  1. A
    Less than 55%
  2. Less than 35%Cevap
  3. C
    Less than 65%
  4. D
    Less than 75%

Cevap

Less than 35%
To prevent autoscale flapping, the scale-in threshold must be configured so that the CPU average immediately after a scale-out event does not drop below the scale-in threshold. If we have 2 instances running at 80% CPU (total CPU capacity of 160%) and scale out to 3 instances, the new average CPU drops to 160%/353.3%160\% / 3 \approx 53.3\%. If we have 3 instances running at 80% CPU (total CPU capacity of 240%) and scale out to 4 instances, the new average CPU drops to 240%/4=60%240\% / 4 = 60\%. Therefore, to prevent a scale-in rule from triggering immediately after scaling out, the scale-in threshold must be lower than 53.3%. Choosing a threshold of 35% satisfies this condition.

Adım Adım Çözüm

1
Calculate the total CPU workload at the scale-out threshold of 80% for different instance counts.
For 2 instances, total capacity is 160%160\%. For 3 instances, total capacity is 240%240\%.
This determines the amount of load that will be redistributed when a new instance is added.
2
Calculate the expected average CPU workload per instance immediately after scaling out.
Scaling from 2 to 3 instances drops the average CPU to 160%/353.3%160\% / 3 \approx 53.3\%. Scaling from 3 to 4 instances drops the average CPU to 240%/4=60%240\% / 4 = 60\%.
To prevent flapping, the scale-in threshold must be set below these post-scale-out values.
3
Compare the calculated values with the available threshold options to identify a safe scale-in limit.
The threshold must be strictly less than 53.3%. The option 'Less than 35%' is the only configuration that prevents flapping across all possible transitions.
Selecting a threshold like 55%, 65%, or 75% would cause the post-scale-out CPU load to trigger an immediate scale-in, creating a flapping loop.

Anahtar Kavram

Autoscale rule thresholds must be configured to prevent flapping, which occurs when a scale-out event immediately satisfies the criteria for a scale-in event.
Bu soruyu puanla