Soru

Zorluk: ZorConfigure Virtual Machine Scale Sets (VMSS)

You are configuring a Virtual Machine Scale Set (VMSS) named `vmss-worker` that runs a CPU-bound processing service. The VMSS is configured with a minimum instance count of 2 and a maximum instance count of 10. The scale-out rule is configured to increase the instance count by 1 when the average CPU percentage is greater than 75% for 10 minutes. You need to configure a scale-in rule that decreases the instance count by 1 when the workload decreases. The scale-in rule must prevent thrashing (immediate scale-in) when the scale set is running at its minimum capacity of 2 instances and triggers a scale-out. Which of the following is the maximum CPU percentage threshold you should configure for the scale-in rule?

  1. 45%Cevap
  2. B
    55%
  3. C
    60%
  4. D
    70%

Cevap

45%
The threshold of 45% is the only option that is strictly below 50%. When the scale set scales out from 2 instances (exceeding 75% average CPU, or 150% total CPU load) to 3 instances, the workload is distributed, reducing the average CPU per instance to 50%. A scale-in threshold of 45% ensures the new workload level (50%) does not trigger an immediate scale-in event, avoiding thrashing.

Adım Adım Çözüm

1
Calculate the total CPU workload at the scale-out threshold.
2×75%=150%2 \times 75\% = 150\% total CPU capacity.
When running at the minimum instance count of 2, the scale-out rule is triggered when the average CPU exceeds 75%.
2
Calculate the post-scale-out average CPU usage per instance.
150%/3=50%150\% / 3 = 50\% average CPU usage.
When the scale-out triggers, the scale set increases from 2 to 3 instances. The total workload of 150% is now distributed across 3 instances.
3
Determine the maximum scale-in threshold to prevent thrashing.
The scale-in threshold must be strictly less than 50%.
If the scale-in threshold is 50% or higher, the post-scale-out average CPU (50%) will immediately trigger a scale-in event, causing thrashing.

Anahtar Kavram

To prevent VMSS autoscale thrashing, the scale-in metric threshold must be set lower than the expected resource usage per instance after a scale-out event occurs.
Bu soruyu puanla