Azure Web App Scaling - Part One

Elasticity is the characteristic of cloud computing that differentiates the cloud from other computing paradigms like distributed computing or grid computing, which means how your system is going to adapt its capacity when the workload changes over time. When you have a website with 50 users on average in an hour it's about how the system responds if the users increase over time or use increases in a specific time like having 500 users in evening peak time.

In Azure, you are provided with different price tier plans to choose from, each with different configurations that is the number of cores, size of RAMs and Hard Disks etc. One of this is called as an instance, that is whenever you build a website the instance of the website will be built. As we defined above elasticity as the adaptability of resources, in Azure we called it scaling, which is increasing or decreasing resources with respect to workload.

There are two workflows for scaling, scale up and scale out.

  • Scaling up and Scaling down means getting more resources in the form of CPU, disk spaces, memory or features like custom domains or staging slots. You can do scaling up by changing the App Service Plan that your app belongs to.

  • Scaling out and in means instead of upgrading resources we are adding another instance of the same server (Virtual Machine) of the same configuration. The scale settings take only seconds to apply and they do not require you to take the sever down for a better plan.

On Azure Portal, you can manually set the instance count of your service, or you can set parameters to have it automatically scaled based on the demand. It is not possible to scale to zero as it means the web app is not up and running.

It is important to note that only the same app plan can be converted into an instance. That is, it is not possible to have two instances of Basic1 and one instance of basic 2.

Here, I am creating a new Web App with a new Service Plan and you can see that under shared and free it is not possible to have scaling and on the basic plan you can scale up to three and but only manual scaling is allowed;  that is, you have to come in and scale in case of requirement,

 

In a standard plan, you can go up to 10 instances and in premium plan, it allows you to have up to 20 instances based on availability. These two plans allow auto scale. You can also have a look at the resources allocated for each plan. Here I am choosing S1 Standard and creating the Web App.



While selecting Scale Up option from the dashboard, they are providing you the option to upgrade the Pricing Tier of the App Service Plan; you can choose as per your requirement and they will take care of all the procedure.



In Scale Out section, you can see a slider to scale out from one to ten and the auto scaling is disabled by default. As we mentioned above, the value starts from one and it is not possible to have zero. In case you are not using your application, you have to stop the App Service.



To increase the number of instances, you just have to move the slider to the value. For example, here I am going to have three instances of my app running and I am giving the value of three and saving it.



Now, your app will be running at three instances irrespective of time and any other parameters. In part two we will see how to automate this process based on some other parameters.


Similar Articles