Auto scaling App Service
📖 Scenario: You are managing a web application hosted on Azure App Service. To handle varying user traffic efficiently, you want to set up auto scaling. This means the app will automatically add or remove instances based on CPU usage, so it stays fast and cost-effective.
🎯 Goal: Build an Azure Resource Manager (ARM) template snippet that configures auto scaling for an Azure App Service plan. The scaling rule should increase instances when CPU usage is above 70% and decrease when below 30%.
📋 What You'll Learn
Create a resource group variable named
resourceGroupName with the value MyResourceGroup.Create a variable named
appServicePlanName with the value MyAppServicePlan.Define an autoscale setting resource named
autoscaleSetting targeting the App Service plan.Configure two scale rules: one to scale out when CPU > 70%, another to scale in when CPU < 30%.
💡 Why This Matters
🌍 Real World
Auto scaling helps web apps handle traffic spikes smoothly without manual intervention, saving cost and improving user experience.
💼 Career
Cloud engineers and DevOps professionals often configure autoscaling to ensure applications remain responsive and cost-efficient.
Progress0 / 4 steps