Microsoft Certified: Azure Developer Associate (AZ-204)Develop Azure compute solutionsMedium
A global e-commerce company is experiencing unpredictable traffic spikes for its main product catalog website during flash sales and holiday seasons. The website is hosted on Azure App Service. The company needs to ensure that the website can automatically scale out to handle these extreme loads without manual intervention and then scale back in when traffic subsides, optimizing costs. Which App Service feature should be configured to meet these requirements?
- ATraffic Manager
- BDeployment Slots
- CAlways On
- DAutoscaling
Show answer & explanationAnswer & explanation
Correct answer: D. Autoscaling
Autoscaling in Azure App Service automatically adjusts the number of instances based on demand (e.g., CPU usage, HTTP queue length), ensuring the application can handle traffic spikes and scale down during low periods to optimize costs. This directly addresses the requirement for automatic scaling without manual intervention.
Why the other options are wrong
- A. Traffic Manager is a DNS-based load balancer for distributing traffic across different endpoints globally, but it does not scale the underlying compute instances of an App Service within a region.
- B. Deployment Slots are for staging and production deployments, not for automatic scaling based on traffic.
- C. Always On keeps the app loaded to prevent cold starts, but does not scale the number of instances.
Azure App Service Autoscaling
A feature of Azure App Service that automatically adjusts the number of instances (scale out/in) of your web application based on predefined metrics and rules, ensuring performance during high demand and cost optimization during low demand.
- Configurable with metric-based rules (e.g., CPU, memory, HTTP queue)
- Supports both scale-out (add instances) and scale-in (remove instances)
- Requires a Standard, Premium, or Isolated App Service plan
- Can be scheduled for specific times
Memory trick: Autoscale handles traffic, Slots for deployments, Always On keeps it quick, Traffic Manager goes global.