AZ-104 Question 176
Single answerYou manage an Azure App Service plan for a web application that experiences unpredictable traffic spikes. The application must automatically scale out additional instances when CPU usage exceeds 75% for 5 minutes, and scale in once CPU usage drops below 35%. How should you configure the scaling settings to meet these requirements while minimizing cost?
- A
Create a new scale rule specifically at the Web App resource level within the same resource group
- B
Enable autoscaling in the Azure App Service plan with custom scale conditions for the CPU threshold
- C
Configure scale settings at the resource group level for all resources in the Azure portal
- D
Enable scale operations at the subscription level using Azure Policy
Show answer and explanation
Correct answer: B
Explanation
Autoscaling for an Azure Web App is managed through the App Service plan settings. By configuring custom scale conditions (like CPU usage thresholds), you can efficiently add or remove instances in response to traffic patterns.
- A. Incorrect.
Scaling cannot be configured solely on the Web App resource. Azure Web Apps scale according to the App Service plan settings, not at the individual Web App level.
- B. Correct.
This is correct because you configure autoscaling rules based on CPU usage and other metrics in the Azure App Service plan. These rules directly control how many instances are allocated to handle traffic spikes.
- C. Incorrect.
Scaling at the resource group level is not supported as a dedicated mechanism for App Service resources. Scaling needs to be configured at the App Service plan level.
- D. Incorrect.
Azure Policy cannot directly manage automatic scaling at the subscription level. Autoscaling must be set up within the App Service plan for this scenario.