Scaling In Azure App Service


Predicting the right time to scale your application to meet the traffic has been a headache for almost all organizations. Back in the old days, organizations used to manage the underlying infrastructure and manage the sudden surge in the traffic to the application. This was quite expensive, as you would have to buy in all the servers, network, and storage devices, configure and patch them to enable your application with the capability to handle the new surge in traffic. When the surge in traffic gets back to normal, these resources stay idle until the next time we see a surge in network traffic for our web application. In short, organizations had full responsibility to make sure the application’s underlying hardware was working well.
However, with the onset of cloud computing and the introduction of IaaS (Infrastructure as a Service), things changed for good. Now, organizations don’t need to rack in servers, network, or storage devices. They can just scale up or scale out as and when they require by paying for the time they need these resources. But this too had some constraints of its own: you had to regularly update your operating to do patches and ensure the hosting environment is properly set up to deploy your applications and few others. Although you had to do all the above-mentioned things yourself, your capital expenditure is very less in comparison to the on-premise way and is on a shared responsibility model.
Although we do save a lot of capital expenditure with the IaaS way of hosting applications, there were still some areas of improvement. With the introduction of PaaS (Platform as a Service), we were able to worry less about the underlying infrastructure management. For our application, scaling remains one aspect which we still have to handle.
Still, this remains an efficient and cost-effective way compared to on-premise as well as the IaaS model of hosting applications.
Azure App Service is a PaaS offering of Microsoft Azure to build and host applications without worrying about infrastructure management irrespective of the language they were written in. There are some parts that you would have to manage in a PaaS model. One of them being the scaling aspect of your application. Azure app service allows you to scale your application both horizontally and vertically.
Scaling your app by increasing/decreasing the capability of the resource, in terms of going to higher/lower tier by opting for more/less cores, RAM, and Storage depending on your requirement, this is known as Vertical Scaling.
Scaling your app by increasing/decreasing the number of instances of your server with the same cores, RAM and storage to handle the traffic depending on your requirement, this is known as Horizontal Scaling.
In this article, we are going to discuss various ways to scale our apps by leveraging the scaling capabilities of Azure app service. First, we look at the steps to manually scale our application by exploring the scale-up option in Azure app service and later look at ways to scale out to handle the surge in traffic for our web applications.

Steps to Scale up your Azure App Service

To scale up the Azure App Service, We would first need to go to the app service and then search for “Scale-Up ( App Service Plan)”. Then select the app service plan to the desired pricing tier and click on apply, as shown in the image below.
Before discussing the steps to enable scale-out options in your azure app service, I would like to share the various ways in which you can enable scale out and scale in options for your azure app service. 
  1. Manually increasing the instances count
  2. Increasing instances count on a schedule
  3. Auto Scaling based on rules based on metrics
Scale-out/in options or horizontal scaling options are not available in all price tiers.
For this article, we are going to demonstrate how to do manual scaling for our azure app service. I’m currently using the B1 pricing tier which enables you to do manual scale for your application hosted in the Azure app service. This pricing tier allows us to scale out up to 3 instances.

Steps to Scale-out your Azure App Service

To scale out the azure app service, We would first need to go to the app service and then search for “Scale-out( App Service Plan)”. Then move the slider in the instance count present in the Manual Scale section to the required number of instances you want to scale or write the number of instances in the text box as highlighted in the image below with 2-A and 2-B and click on save as shown in the image below.


Scaling your applications has always been the point of concern for the organization and with Azure app service, you are empowered with a lot many options to scale in/out or scale up/down as per our requirement and network traffic. As discussed above in the article, We can manually perform vertical and horizontal scaling of our application in the Azure app service. Apart from that we can also enable auto-scaling for web applications. But this service is available in specific pricing tiers. This aspect will be covered in an upcoming article. As a whole, scaling has become quite easy thanks to the capabilities of Azure App Service.

Similar Articles