Soru

Zorluk: OrtaConfigure Azure Monitor Autoscale Rules and Metrics

An organization hosts a retail web application on an Azure Virtual Machine Scale Set (VMSS) with a minimum instance count of 22 and a maximum instance count of 1010. You configure a scale-out rule that increases the instance count by 22 instances when the average CPU Percentage is greater than 80%80\%. You need to configure a scale-in rule to reduce the instance count when demand drops. Which of the following scale-in configurations will prevent autoscale flapping? (Select two.)

  1. A scale-in rule that decreases the instance count by 11 instance when the average CPU Percentage is less than 50%50\%.Cevap
  2. A scale-in rule that decreases the instance count by 22 instances when the average CPU Percentage is less than 35%35\%.Cevap
  3. C
    A scale-in rule that decreases the instance count by 11 instance when the average CPU Percentage is less than 55%55\%.
  4. D
    A scale-in rule that decreases the instance count by 22 instances when the average CPU Percentage is less than 45%45\%.

Cevap

The correct scale-in configurations are a decrease of 1 instance when the CPU is less than 50%, and a decrease of 2 instances when the CPU is less than 35%.
To prevent flapping, the average CPU percentage after a scale-in must be less than the scale-out threshold of 80%80\%. For a scale-in of 1 instance from 3 to 2, a scale-in threshold of 50%50\% ensures the new CPU is at most (3×50%)/2=75%<80%(3 \times 50\%) / 2 = 75\% < 80\%. For a scale-in of 2 instances from 4 to 2, a scale-in threshold of 35%35\% ensures the new CPU is at most (4×35%)/2=70%<80%(4 \times 35\%) / 2 = 70\% < 80\%. Both configurations are stable.

Adım Adım Çözüm

1
Calculate the maximum workload just before the scale-in event triggers for each option.
For a threshold TinT_{in} at NN instances, the workload is N×TinN \times T_{in}.
This workload is redistributed across the remaining instances after the scale-in occurs.
2
Determine the post-scale-in average CPU percentage.
For scale-in by kk instances, the new average CPU is (N×Tin)/(Nk)(N \times T_{in}) / (N - k).
To avoid flapping, this new value must be strictly less than the scale-out threshold of 80%80\%.
3
Evaluate the worst-case scenario at the minimum instance count where scaling can occur (N=3N = 3 for k=1k=1, and N=4N = 4 for k=2k=2).
With k=1k=1, TinT_{in} must be <53.33%< 53.33\%. With k=2k=2, TinT_{in} must be <40%< 40\%.
Applying these limits shows that 50%50\% (for k=1k=1) and 35%35\% (for k=2k=2) are safe thresholds, while 55%55\% and 45%45\% trigger immediate scale-out loops.

Anahtar Kavram

Autoscale flapping prevention and metric threshold calculations
Bu soruyu puanla