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

A manufacturing company uses an Azure App Service web application to display real-time production line data. During peak shifts, the application experiences high load, and it must scale out to ensure responsiveness. During off-peak hours, the application should scale in to reduce costs. The company wants to implement a robust autoscaling solution that adjusts the number of instances based on the average CPU utilization of the existing instances. What is the PRIMARY metric that should be configured for the autoscaling rule?

  1. AMemory Percentage
  2. BCPU Percentage
  3. CHTTP Queue Length
  4. DData In/Out
Show answer & explanation

Correct answer: B. CPU Percentage

CPU Percentage is the most common and effective metric for scaling out web applications that experience high load due to processing demands. When CPU utilization increases, it indicates that the existing instances are under stress, and new instances are needed to distribute the workload and maintain responsiveness.

Why the other options are wrong

  • A. Memory Percentage can be a factor, but high CPU is a more direct indicator of processing bottleneck for web apps.
  • C. HTTP Queue Length is more relevant for scaling based on the number of pending requests, not directly CPU load.
  • D. Data In/Out is typically used for monitoring network traffic, not for scaling based on computational load.

App Service Autoscale Metrics

Azure App Service can autoscale based on various metrics, including CPU percentage, memory percentage, HTTP queue length, and custom metrics, to ensure optimal performance and cost efficiency.

  • CPU Percentage is a common metric for general processing load.
  • Autoscale rules define when to scale out (add instances) and scale in (remove instances).
  • Metrics are aggregated (e.g., average, maximum) over a time period.

Memory trick: Metrics 'M'easure 'E'very 'T'hread 'R'unning 'I'n 'C'ode.

More Develop Azure compute solutions questions