Auto-scaling Azure App Service Part 1 of 2

I will give a detailed look at the configuration and operation of auto-scaling in my Azure app service plan. Along with my comments and experiences.

I have an Azure App Service Plan with 1 Core / 3GB RAM with one web app deployed. Although you can have many web apps in the same plan to share the compute resources.

To support auto-scale, you need to have pricing plans of either Standard, Premium or Isolated. This is apart from the cheaper free, shared and basic plans. Click here for pricing details.

For how-to and intro based resources, you can read the following

The auto-scale blade is found in two places
autoscale2

  • The App Service Plan > Scale out blade.
  • Azure App Service Web App. But as indicated, this applies to the App Service Plan level opposed to just the one web app.

So, don’t get confused. They point to the same configuration.

Auto-scale settings

I have setup two auto scale profiles

1) Default Profile

autoscale3
Note that this rule occurs last as noted in the Schedule. So watch out as this wasn’t that clear to me at first. I felt the order of precedence was by order of top to bottom as the UI.

Within the scale condition, I have two rules

  • Scale out.
    Another instance is added when the Average CPU over a 5-minute duration is greater than 30%. The 5-minute cool down is so to prevent another trigger of scale operations. This for situations where it is known to be a period of many spikes in the metrics and so allow the environment to stabilize. You normally want this to be much longer such as 1 hour or more, but depends on the performance requirements and capacity.
    autoscale4
  • Scale In
    The instance count is decremented by 1 when the average CPU over 10-minute period is less than 5%.
    autoscale5

2) 2nd Scale Profile

This 2nd scale condition has precedence over the default scale condition. Based on its schedule, 2 instances are increased when the average CPU > %50 over 5-minute period. I I have configured to cap the instance count to a maximum of 3 instances.
autoscale6

To see the operation of the auto-scale, read part 2 Auto-scaling Azure App Service Part 2 of 2

3 thoughts on “Auto-scaling Azure App Service Part 1 of 2

  1. Pingback: Azure AD Application Proxy with a Claims Aware Web App – Part 5 – Roy Kim on Azure, Office 365 and SharePoint

  2. Pingback: Découverte d’Application Insights – Partie II C – Nouvelles Chroniques d'Amethyste

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s