An organization hosts a report generation web application named contoso-reports on an Azure App Service Web App. The web application currently runs on an App Service plan named asp-free using the Free (F1) pricing tier.
During scheduled weekly report generation, the web application experiences severe CPU spikes that cause performance degradation. You need to implement an autoscale strategy using the Azure CLI that meets the following requirements:
- The hosting plan must be changed to the lowest cost tier that supports autoscale rules.
- The instance count must scale out by 1 instance when average CPU utilization is greater than 85% for 10 minutes.
- The instance count must scale in by 1 instance when average CPU utilization drops below 40% for 10 minutes.
- The configuration must prevent autoscale flapping.
Which four Azure CLI commands should you execute in sequence? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order. (Note: Configure the scale-out rule before the scale-in rule.)
- 1az appservice plan update --name asp-free --resource-group rg-reports --sku S1
- 2az monitor autoscale create --resource-group rg-reports --resource asp-free --resource-type Microsoft.Web/serverfarms --name autoscale-reports --min-count 1 --max-count 4 --count 1
- 3az monitor autoscale rule create --resource-group rg-reports --autoscale-name autoscale-reports --scale out 1 --condition "CpuPercentage > 85 avg 10m"
- 4az monitor autoscale rule create --resource-group rg-reports --autoscale-name autoscale-reports --scale in 1 --condition "CpuPercentage < 40 avg 10m"