A microservice API gateway runs on an Azure App Service plan (Premium V3 tier) that is currently scaled to instances. You configure an autoscale setting with the following scale-out rule:
- Metric: CPU Percentage
- Time grain (aggregation): Average
- Operator: Greater than
- Threshold:
- Action: Increase count by
To ensure that the application scales in when load decreases but does not experience scale flapping, you need to configure the scale-in rule. Which of the following scale-in configurations should you use?
- Metric: CPU Percentage; Time grain: Average; Operator: Less than; Threshold: ; Action: Decrease count by Cevap
- BMetric: CPU Percentage; Time grain: Average; Operator: Less than; Threshold: ; Action: Decrease count by
- CMetric: CPU Percentage; Time grain: Average; Operator: Less than; Threshold: ; Action: Decrease count by
- DMigrate the App Service plan to the Shared tier to automatically enable the built-in dynamic scaling feature.
Cevap
Configure the scale-in rule with CPU Percentage, Average time grain, Operator less than, Threshold of , and Action to decrease the count by .
The correct scale-in configuration uses a threshold of and decreases the instance count by . At the scale-out threshold of CPU on instances, the total workload load is . After scaling out by instances (total of ), the average CPU load becomes . Because the scale-in threshold is set to , the rule will not trigger immediately. If the workload drops enough to trigger the scale-in rule (below , which is less than total workload), scaling in by instances reduces the capacity back to instances. The new average CPU load will be less than , which is safely below the scale-out threshold, preventing flapping.
Adım Adım Çözüm
Anahtar Kavram
Configuring Azure Monitor autoscale rules to avoid flapping by aligning the scale-out and scale-in thresholds and step sizes.