Microsoft Certified: Azure Developer Associate (AZ-204)Develop Azure compute solutionsMedium

A global e-commerce company uses an Azure App Service web application to handle customer orders. During peak sales events, traffic can surge dramatically, requiring the application to scale out rapidly to hundreds of instances. The company needs to ensure that the application can handle these sudden spikes in demand without manual intervention and then scale back down to minimize costs during off-peak hours. Which Azure App Service scaling feature is MOST suitable for this requirement?

  1. AAutoscale based on schedule
  2. BAutoscale based on custom metrics
  3. CManual scale
  4. DAutoscale based on CPU percentage
Show answer & explanation

Correct answer: D. Autoscale based on CPU percentage

Autoscale based on CPU percentage is ideal for handling unpredictable traffic spikes. It automatically adds instances when CPU utilization increases (indicating high demand) and removes instances when it decreases, ensuring optimal performance and cost efficiency without manual intervention.

Why the other options are wrong

  • A. Autoscale based on schedule is for predictable traffic patterns, not sudden, unpredictable surges.
  • B. Autoscale based on custom metrics could work, but CPU percentage is a standard and effective metric for general web application load, and it's simpler to configure for this scenario than custom metrics unless very specific application behavior needs to be tracked.
  • C. Manual scale requires human intervention and cannot react quickly to sudden, unpredictable traffic spikes.

Azure App Service Autoscale

Azure App Service Autoscale automatically adjusts the number of running instances for an application based on predefined rules, metrics, or schedules to optimize performance and cost.

  • Scales out (adds instances) to handle increased load.
  • Scales in (removes instances) to save costs during low load.
  • Can be based on CPU, memory, HTTP queue, or custom metrics.
  • Supports both scheduled and metric-based rules.

Memory trick: Autoscale: 'A'utomatically 'S'cales 'C'apacity.

More Develop Azure compute solutions questions