35

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,

Trevor Reid
  • 3,310
  • 4
  • 27
  • 46
Nasser AlNasser
  • 1,725
  • 2
  • 11
  • 12
  • Modifying based on the discussion below: So basically if I have S1 App Service Plan (1.75 GB RAM, 1 core) and I started an app (let say website) with 1 instance and assign it to this App Service Plan. So this 1 instance will have all the resources to use. If I created 5 instances of this app (auto or manual scaling) will I have 5 X (1.75 GB , 1 Core) ? Or all the 5 instances will share the same set of resources? – Nasser AlNasser Nov 14 '16 at 09:45
  • Yes, you will have 5 instances of 1.75GB\1Core – 4c74356b41 Nov 14 '16 at 19:09
  • I couldn't get scaling out to work at all. Set the minimum to 2, hit apply and watched as it did absolutely nothing and continued running on 1 instance. Really useful.. thanks ms. – Sam Oct 06 '17 at 06:02

4 Answers4

35

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.

4c74356b41
  • 69,186
  • 6
  • 100
  • 141
  • 1
    Thanks a lot for the reply. OK so actually Azure is not scaling the App itself, it scale the App Service Plan that hosting the app? Am I getting it right? So each instance of the App is actually get a temporary App Service Plan with it's own resources and pricing? – Nasser AlNasser Nov 14 '16 at 08:31
  • 3
    Actually now I am more confused :( So basically if I chose S1 App Service Plan (1.75 GB RAM, 1 core) and I started an app (let say website) with 1 instance and assign it to this App Service Plan. So this 1 instance will have all the resources to use. If I created 5 instances (auto or manual scaling) will I have 5 X (1.75 GB , 1 Core) ? Or all the 5 instances will share the same set of resources? – Nasser AlNasser Nov 14 '16 at 09:44
  • 6
    Yes, each instance is a separate VM, so 5 x 1.75GB, 1 Core – 4c74356b41 Nov 14 '16 at 09:47
  • 3
    The App Service Plan has instances, the Apps which are assigned to the plan share those instances. If you have a plan with 3 instances and 2 apps assigned to it, you'll have those 2 apps running on each of the 3 instances. – juunas Nov 14 '16 at 19:06
  • 1
    Thanks, this clarifies it a lot for me; I just couldn't get a clear picture at all from Microsoft docs or their sales people. Infact i think they were just literally making things up when i spoke to them. – Shane Nov 30 '18 at 05:37
  • Thanks for the explanation, just adding one more doubt- What if I don't want to run multiple instances of my App1 but want to run App2 in multiple instances. Say I am scaling out to three instances. My App1 and App2 are in same App service plan. – Mukesh Kumar Sep 28 '20 at 11:06
  • you'd have to create a separate app service plan for them, in that case. – 4c74356b41 Sep 28 '20 at 11:19
10

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.

Bruce Chen
  • 18,207
  • 2
  • 21
  • 35
1

As @4c74356b41 said when you scale out you are going to get more physical resources (i.e VM's with more compute, memory and storage). Also one correction as per Azure documentation, scale out is going to effect all apps in app service plan. see below link and the point to note is

"The scale settings take only seconds to apply and affect all apps in your App Service plan. They do not require you to change your code or redeploy your application" - https://azure.microsoft.com/en-us/documentation/articles/web-sites-scale/

Gopi Kolla
  • 964
  • 6
  • 12
0

The docs answer this clearly: https://learn.microsoft.com/en-us/azure/app-service/overview-hosting-plans#how-does-my-app-run-and-scale

In this way, the App Service plan is the scale unit of the App Service apps. If the plan is configured to run five VM instances, then all apps in the plan run on all five instances. If the plan is configured for autoscaling, then all apps in the plan are scaled out together based on the autoscale settings.

Daniel Mackay
  • 2,298
  • 1
  • 15
  • 19