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.