Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does scaling out work in Azure App Services?

I am trying to wrap my head around the concept of Azure App Service plan and Azure App Services, with no luck.

My understanding is that an App Service Plan defines the capacity and the pricing, all apps assigned to a specific App Service plan will share the same resources, is that right?

If that is right, then what is the benefit of the scaling-out? If the scale out will create more instances of the same app which at the end will be hosted on the same App Service Plan (sharing the same resources)?

I read almost all the official and non-official documentation about Azure App Service plan and App Services but couldn't find an answer to this question, they are all saying that scaling is working on the app level (not the app service plan) and at the same time saying that the apps assigned to the same app service plan are actually sharing the same resources, so what is the benefit of the scale-out feature?

Regards,

like image 565
Nasser AlNasser Avatar asked Nov 13 '16 22:11

Nasser AlNasser


People also ask

How does Azure App Service scaling work?

The App Service platform will automatically scale out the number of running instances of your application to keep up with the flow of incoming HTTP requests, and automatically scale in your application by reducing the number of running instances when incoming request traffic slows down.

How does Azure scale out?

Scale-Out (Horizontal scaling) It is basically adding multiple instances of the application that runs in your app. In other words, it increases the number of VM instances up to 30 depending upon your pricing tier. However, in an Isolated tier, we can further scale up to 100 instances based on our requirements.

Is Azure App Service Auto scalable?

Azure App Service has built-in autoscaling. Autoscale settings apply to all of the apps within an App Service. See Scale instance count manually or automatically and Scale up an app in Azure App Service. Azure Cloud Services has built-in autoscaling at the role level.

How do I scale down Azure App Service?

To scale down, go to Azure web application and select Scale up (App Service plan). The selected pricing tier will have a blue border around it. Change the lower pricing tier based on your requirements. Click on Select.


2 Answers

My understanding is that an App Service Plan defines the capacity and the pricing, all apps assigned to a specific App Service plan will share the same resources, is that right?

Yes.

If that is right, then what is the benefit of the scaling-out? If the scale out will create more instances of the same app which at the end will be hosted on the same App Service Plan (sharing the same resources)?

No one forces you to put all your apps on the same App Service Plan. When you create an App you put it into some App Service Plan. All the Apps on that (and only that) App Service Plan would share resources, but you could create a lot of App Service Plans.
Also, when you scale out you create more PaaS instances of the VM's hosting your App, so when you scale out you are not getting another App Pool in the same IIS, you are getting another App Pool on the other IIS on the other VM.

edit: to clarify the comment, the App Service Plan is a collection of Windows VM's with IIS installed on them. All the Apps assigned to that App Service Plan are hosted on ALL the instances of those VM's, when you scale out or scale up you change the number or capacity of those VM's.
There's no temporary App Service Plan. You pay for the Service Plan, not for the App. Apps cost nothing, they are simply consuming resources on the Service Plan, its the Service Plan that "eats" money. You are getting billed according to the Service Plan tier and scale.
Pricing is based on the size and number of VM instances you run.

like image 105
4c74356b41 Avatar answered Sep 22 '22 03:09

4c74356b41


As I know, the scale out would create multiple copies of your web app and add a Load Balance to distribute the requests between them automatically. And you don't need to configure the load balance separately by yourself.

Assuming that you create a website (a windows server with IIS), then your website would has the App Pool which defines the available resources for your website. Each instance could handle a limited number of requests, in order to reduce the response time, you could scale out your website into multiple instances, then each web-server could split the work load. For more details, you could refer to Scaling Up and Scaling Out in Windows Azure Web Sites and this tutorial for a better understanding of Azure Web App auto scale.

like image 31
Bruce Chen Avatar answered Sep 22 '22 03:09

Bruce Chen