AZ-104 Question 177
Single answerYou manage an Azure App Service hosting a mission-critical web application. The application experiences heavy, unpredictable traffic that causes performance issues. You need to configure the App Service plan to automatically scale out based on CPU usage during peak times and scale in when the load decreases to reduce costs. Which step should you perform to achieve this?
- A
Enable the Always On feature for the App Service
- B
Configure a scale-out rule based on CPU usage in the App Service plan settings
- C
Enable managed identities for the App Service plan
- D
Upgrade to a Premium App Service plan tier only for vertical scaling
Show answer and explanation
Correct answer: B
Explanation
To automatically scale your App Service based on CPU usage, you must configure an auto-scaling rule under the App Service plan settings. This allows the service to add or remove instances dynamically, ensuring optimal performance and cost efficiency during periods of fluctuating traffic.
- A. Incorrect.
Enabling Always On ensures your app is always running, but it does not configure auto-scaling rules.
- B. Correct.
Configuring a scale-out rule based on CPU usage is essential for automatically increasing or decreasing the number of instances to handle fluctuating traffic demands.
- C. Incorrect.
Enabling managed identities is useful for secure authentication to other Azure services, but it does not address auto-scaling requirements.
- D. Incorrect.
Upgrading to a Premium tier provides advanced features but does not automatically configures scale-out rules. Vertical scaling alone will not help if you need to handle unpredictable spikes in traffic effectively.