Soru

Zorluk: OrtaConfigure Virtual Machine Scale Sets (VMSS)

A company runs a web application on an Azure Virtual Machine Scale Set named `vmss-web`. The scale-out rule for `vmss-web` is configured to add one instance when the average Percentage CPU exceeds 80% for 10 minutes.

To optimize costs, you must define a scale-in rule that decreases the instance count by one.

Which scale-in rule configuration should you implement to prevent instance thrashing?

  1. Metric: Percentage CPU; Threshold: Less than 30%; Action: Decrease count by 1Cevap
  2. B
    Metric: Percentage CPU; Threshold: Less than 75%; Action: Decrease count by 1
  3. C
    Metric: Available Memory Bytes; Threshold: Less than 1 GB; Action: Decrease count by 1
  4. D
    Metric: Disk Write Operations/Sec; Threshold: Less than 100; Action: Decrease count by 1

Cevap

The scale-in rule must use the same metric (Percentage CPU) as the scale-out rule, with a threshold set to less than 30% and a scale-in action of decreasing the count by 1.
The correct configuration is to use the same metric (Percentage CPU) as the scale-out rule, with a threshold (30%) that is significantly lower than the scale-out threshold (80%). This difference prevents instance thrashing, where the workload redistributed to the remaining instances after a scale-in immediately triggers a scale-out.

Adım Adım Çözüm

1
Identify the scale-out metric and threshold.
The scale-out rule triggers when Percentage CPU exceeds 80%. When this happens, a new instance is added to distribute and reduce the average load.
Understanding the baseline metric and threshold is essential to design a non-conflicting scale-in rule.
2
Ensure the scale-in metric matches the scale-out metric.
The scale-in rule must also be configured to monitor the Percentage CPU metric.
Using mismatched metrics (such as Memory or Disk write operations) leads to conflicting scaling decisions, causing the scale set to scale out for one metric and scale in for another.
3
Determine the scale-in threshold margin.
A scale-in threshold of less than 30% provides a safe operational margin.
When an instance is removed, the average load on the remaining instances increases. If the scale-in threshold is set too high (e.g., 75%), the post-scale-in load spike will immediately cross the 80% scale-out threshold, causing instance thrashing.

Anahtar Kavram

Virtual Machine Scale Set autoscale rule design to prevent thrashing
Tahmini Süre:1m 30s
Bu soruyu puanla