An organization deploys a web application to an Azure App Service web app. You configure the following autoscale rules for the App Service plan:
* Scale-out rule: Increase the instance count by 2 when the average CPU percentage is greater than 70% over a 10-minute duration.
* Scale-in rule: Decrease the instance count by 1 when the average CPU percentage is less than 75% over a 10-minute duration.
During periods of moderate, stable load, the application experiences flapping, where instances are repeatedly added and removed.
You need to resolve the flapping behavior and ensure stable scaling of the web application.
Which of the following modifications should you make?
- ADecrease the scale-out duration from 10 minutes to 2 minutes while keeping the thresholds unchanged.
- Change the scale-in threshold to trigger when the average CPU percentage is less than 40%.Answer
- CChange the scale-in threshold to trigger when the average CPU percentage is less than 85%.
- DChange the scale-in rule to decrease the instance count by 2 instead of 1.
Answer
Change the scale-in threshold to trigger when the average CPU percentage is less than 40%.
Changing the scale-in threshold to less than 40% CPU usage resolves the flapping behavior. When the web app scales out by 2 instances, the average CPU percentage drops. By setting the scale-in threshold to a significantly lower value (40%), you prevent the system from immediately triggering a scale-in action when the CPU usage drops after scaling out. This creates a stable scaling profile.
Step-by-Step Solution
Key Concept
Autoscale rules must have a sufficient safety margin (cool-down gap) between scale-out and scale-in thresholds to prevent flapping.