AZ-104 Question 175
Single answerYou manage an Azure App Service hosting a busy e-commerce application experiencing unpredictable traffic spikes. You want to ensure the application can seamlessly handle sudden surges in load while minimizing costs. Which configuration should you implement to automatically add or remove instances based on CPU usage?
- A
Configure manual scaling in the App Service plan
- B
Configure auto-scaling based on CPU usage threshold
- C
Use deployment slots to automatically handle traffic spikes
- D
Upgrade the App Service plan to a higher pricing tier
Show answer and explanation
Correct answer: B
Explanation
Auto-scaling based on metrics, such as CPU usage, enables the App Service to dynamically adjust the number of running instances. This supports unpredictable traffic spikes at a controlled cost, which is why it is the recommended approach.
- A. Incorrect.
Manual scaling requires manual intervention and does not respond dynamically to demand spikes.
- B. Correct.
Auto-scaling based on CPU usage allows the system to automatically add or remove instances in response to varying workloads.
- C. Incorrect.
Deployment slots are more commonly used for testing new versions without impacting production, not for automatically scaling instances.
- D. Incorrect.
Upgrading the App Service plan increases resource availability but does not inherently introduce automated scaling capabilities.