Soru

Zorluk: ZorConfigure Azure Monitor Autoscale Rules and Metrics

You are designing autoscale rules for an Azure Virtual Machine Scale Set (VMSS) named `vmss-orders` that hosts an order-processing API. The VMSS is configured with a minimum of 22 instances, a maximum of 1010 instances, and currently runs 44 instances.

You configure the following scale-out rule:
- Metric: CPU Percentage
- Time grain: 11 minute
- Statistic: Average
- Time aggregation: Average
- Operator: Greater than
- Threshold: 90%90\%
- Operation: Increase count by 22
- Cooldown: 55 minutes

You need to create a scale-in rule that decreases the instance count by 11 when the CPU load decreases. You must ensure that the scale-in rule does not cause autoscale flapping if the total workload remains constant at the point the scale-out rule is triggered.

Which of the following is the maximum CPU percentage threshold you should configure for the scale-in rule?

  1. A
    62%62\%
  2. 58%58\%Cevap
  3. C
    70%70\%
  4. D
    75%75\%

Cevap

The maximum safe CPU percentage threshold for the scale-in rule is 58%58\%.
The threshold of 58%58\% is correct because the new average CPU usage per instance after scaling out is 60%60\%. To prevent immediate scale-in (flapping), the scale-in threshold must be strictly less than this post-scale-out average CPU usage. Setting it to 58%58\% prevents the scale-in rule from triggering while the load remains constant.

Adım Adım Çözüm

1
Calculate the total CPU workload at the scale-out trigger.
Total workload is 4×90%=360%4 \times 90\% = 360\%.
Determines the total CPU capacity consumed before scaling out occurs, assuming the workload is evenly distributed across the current 44 instances.
2
Calculate the new instance count after scale-out.
New instance count is 4+2=64 + 2 = 6 instances.
Determines the total number of instances available to handle the workload after the scale-out action completes.
3
Calculate the new average CPU usage per instance under the same load.
New average CPU is 360%/6=60%360\% / 6 = 60\%.
Determines the baseline CPU usage per instance post-scaling when workload remains constant.
4
Determine the maximum scale-in threshold to prevent flapping.
The threshold must be strictly less than 60%60\%, which is 58%58\% among the choices.
If the scale-in threshold is set to 60%60\% or higher, the new average CPU of 60%60\% immediately triggers a scale-in, creating an infinite loop of scaling up and down.

Anahtar Kavram

Autoscale flapping prevention and metric aggregation
Tahmini Süre:2m 30s
Bu soruyu puanla