Deep Dive Into Azure Scaling

You can increase the capacity of an App Service App by one of the following two ways.

  • Scale-up – Upgrade the capacity of the host where the app is hosted (PAAS environment). Ex: Increase the RAM size from 1 cores to 4 cores.

  • Scale-out – Upgrade the capacity of the app by increasing the number of host instances (PAAS Environment). Ex: Having a Load Balancer where your app is hosted on multiple instances. You can do a scale-out in any of the following two ways based on the Tier of your App Service Plan.

    • Manual Scale-out

      • You have to manually scale the apps that are based on Free, Shared and Basic App Service Plans.

    • Auto Scale-out

      • Auto Scaling is possible only for apps that are hosted in Standard and Premium App Service Plans.
      • We can configure the Auto Scale based on the following parameters.

        • CPU Percentage
        • Memory (RAM) percentage
        • Disk queue Length
        • HTTP Queue Length
        • Data in
        • Data Out

On the portal (as of this writing) below are the three options available for Auto-Scaling.

  • An instance count that I enter manually

    • You can directly go-ahead and set the number of instances manually. Here, the instances that are being used are constant irrespective of the load (on the above parameters)

  • CPU Percentage

    • You can configure the average CPU range and the number of instances that you would like to spin up automatically to maintain the average CPU utilization. Basically you can choose the Average utilization of CPU percentage. Based on the value of (Avg CPU percentage selected), Azure will automatically scale-out to those number of instances. Please note that the maximum number of instances that you can configure is dependent on the App Service Plan.

  • Schedule and Performance rules

    • Default Profile

      • App would add an instance automatically if the CPU utilization is more than 80%.
      • App would remove an instance automatically if the CPU utilization is less than 60%..
      • The default profile only has rules for CPU. However, you can add you own custom rules for adding / removing instances based on the parameters earlier in this article.

    • You can create multiple Profiles and rules being configured in each profiles with various parameters for auto scaling.

Note: Maximum number of instances – The number of instances that you can configure is dependent on the App Service Plan.

Please comment if you have any questions and feedback.

(If time permits, I will work on giving a practical demo on increasing the CPU utilization of a given App service via a decent Video).