Question

Difficulty: MediumScale Azure App Service Web Apps

You manage a vehicle telematics API named VeloTrack that is hosted on an Azure App Service Web App. The web app currently runs on a Standard (S1) App Service plan with a default instance count of 1. You need to configure metric-based autoscale settings to handle CPU spikes and prevent autoscale flapping. Which two configurations should you select to meet these requirements? (Choose two.)

  1. A scale-out rule that increases the instance count by 1 when the CPU Percentage is greater than 80%.Answer
  2. A scale-in rule that decreases the instance count by 1 when the CPU Percentage is less than 35%.Answer
  3. C
    A scale-in rule that decreases the instance count by 1 when the CPU Percentage is less than 60%.
  4. D
    Scale the App Service plan to the Shared (D1) tier before applying the CPU-based autoscale settings.

Answer

To configure autoscale rules that handle CPU spikes and prevent flapping, you must define a scale-out rule to add an instance when CPU Percentage is greater than 80%, and a scale-in rule to remove an instance only when CPU Percentage falls below 35%.
The correct configurations are the rules that scale out at 80% CPU and scale in at 35% CPU. With a single instance at 80% CPU, scaling out to two instances halves the load to 40% CPU per instance. Setting the scale-in threshold to 35% ensures that the new load level (40%) does not trigger an immediate scale-in. Additionally, the Standard (S1) plan supports autoscale.

Step-by-Step Solution

1
Analyze the scale-out scenario and workload redistribution.
When 1 instance is running at 80% CPU, scaling out to 2 instances distributes the load, dropping CPU usage per instance to 40%.
Understanding the post-scale-out metric value is necessary to set a safe scale-in threshold.
2
Evaluate the scale-in threshold to prevent flapping.
Select a scale-in threshold less than 40% (such as 35%) so that the scale-in is not immediately triggered after scaling out.
A threshold like 60% is higher than the post-scale-out CPU of 40%, causing the system to scale back in immediately and loop continuously.
3
Verify plan tier compatibility.
Keep the app on the Standard (S1) plan because the Shared (D1) plan does not support autoscale capabilities.
Only Standard, Premium, and Isolated App Service plans support scale-out autoscale rules.

Key Concept

Autoscale flapping occurs when a scale-in threshold is set too close to the scale-out threshold, causing the post-scale metric to immediately trigger the opposite scaling action.
Rate this question