Autoscaling and Custom Domains
Configure scale-out rules based on CPU and HTTP queue metrics, map a custom domain to your web app, and bind a free App Service Managed Certificate.
Why Autoscaling Matters
Autoscaling automatically adjusts the number of App Service instances running your application based on real-time demand. Without autoscaling, you must provision for peak load and pay for idle capacity during off-peak hours. With autoscaling, Azure adds instances when load rises and removes them when it drops, optimising both performance and cost. Autoscaling requires Standard tier or above.
Scale-Out vs Scale-Up
Azure offers two scaling dimensions. Scale out (horizontal scaling) adds more identical instances of your app to share the load — this is what autoscaling primarily does. Scale up (vertical scaling) moves to a larger VM size with more CPU and RAM by changing the App Service plan SKU. Scale-out is preferred for resilience because multiple instances can survive individual failures; scale-up has hardware limits.
# Scale out to 5 instances manually
az appservice plan update \
--name MyAppServicePlan \
--resource-group MyRG \
--number-of-workers 5
# Scale up: change the SKU tier
az appservice plan update \
--name MyAppServicePlan \
--resource-group MyRG \
--sku P2V3All lessons in this course
- Creating an App Service Plan and Web App
- Deployment Slots and Swap
- Autoscaling and Custom Domains
- App Service Authentication and Networking