Question

Difficulty: MediumScale Azure App Service Web Apps

You are managing a CPU-intensive web API named TelemetryProcessor that runs on an Azure App Service Web App. The application is currently hosted on a Shared (D1) App Service plan. During peak hours, the application experiences performance degradation due to CPU spikes. You need to configure the App Service plan to scale out automatically during CPU spikes, ensure the configuration is cost-effective, and prevent autoscale flapping.

Which sequence of steps should you perform to configure the scaling behavior?

  1. 1Upgrade the App Service plan from the Shared (D1) tier to the Standard (S1) tier.
  2. 2Enable autoscale on the App Service plan and define the minimum, maximum, and default instance capacity limits.
  3. 3Configure a scale-out rule that increases the instance count by 1 when the CPU Percentage metric exceeds 80%.
  4. 4Configure a scale-in rule that decreases the instance count by 1 when the CPU Percentage metric falls below 40%.

Answer

To configure autoscaling for the application, first upgrade the App Service plan from the Shared (D1) tier to the Standard (S1) tier. Then, enable autoscale and configure the instance capacity limits. Next, add a scale-out rule that increases the instance count when the CPU Percentage metric exceeds 80%. Finally, add a scale-in rule that decreases the instance count when the CPU Percentage metric falls below 40% to prevent flapping.
The correct sequence ensures that you first scale up the plan to a tier that supports autoscaling, initialize the autoscale setting container, establish the scale-out rule to manage high utilization, and finally establish the scale-in rule with a safe threshold to prevent resource flapping.

Step-by-Step Solution

1
Upgrade the App Service plan from the Shared (D1) tier to the Standard (S1) tier.
The App Service plan is moved to a tier that supports scaling out and autoscale configurations.
The Shared (D1) tier has shared infrastructure and cannot scale out. Upgrading to the Standard (S1) tier is required to support autoscaling.
2
Enable autoscale on the App Service plan and define the minimum, maximum, and default instance capacity limits.
An autoscale profile is created with the specified instance boundaries.
You must establish the autoscale setting container and its capacity boundaries before adding individual metric-based rules.
3
Configure a scale-out rule that increases the instance count by 1 when the CPU Percentage metric exceeds 80%.
A metric-based trigger is added to increase resources during high-traffic CPU spikes.
This rule targets the CPU spikes and adds instances to distribute the load during peak utilization.
4
Configure a scale-in rule that decreases the instance count by 1 when the CPU Percentage metric falls below 40%.
A metric-based trigger is added to scale back down when load decreases, using a safe threshold to prevent immediate rescaling.
To prevent autoscale flapping, the scale-in threshold must be set to a level where the remaining instances can absorb the redistributed load without immediately violating the scale-out rule. A threshold of 40% is safe when scaling out at 80%.

Key Concept

Autoscaling in Azure App Service requires a supported pricing tier (Standard or higher). Once upgraded, the autoscale setting must be created to define capacity boundaries, followed by scale-out rules for performance and scale-in rules with a proper buffer threshold to prevent autoscale flapping.
Estimated Time:2m 0s
Rate this question