This is Part 19 of Azure tutorial.
In our previous video, we discussed, what is App Service.
In this video, we'll discuss App Service Plan.
So, to quickly recap, what is app service?
App service is a platform as a service offering and we use it to host web applications, REST
APIs and backend services for mobile applications.
What is an app service plan?
Well, to create app service, you need an app service plan.
Without an app service plan, you cannot create app service.
At the moment, I am in azure portal and let's create - app service.
I already have App Services icon here.
If you don't have it here, you know what to do.
Use the search text box and search for - app services.
So, I hover over app services and then click on "Create".
As usual, the first two things are - Subscription and Resource group.
Let's actually create a new resource group.
Now, if you notice what we are creating here is actually a web application and here we
provide a name for our website.
For example, if I specify the name of our website as "pragimtech", by default, we get
this URL
"pragimtech.azurewebsites.net".
If we want, we can use our own custom domain.
We'll discuss, how to do that in our upcoming videos.
Next, we need to select a runtime stack.
For now, let's select .NET 5.
Now, we will discuss creating app service and hosting our applications with it in our
upcoming videos.
For now, I want you to focus on this section right here, App Service Plan.
So, the point that I'm trying to make is, to create app service we need an app service
plan.
So, we can either select our existing app service plan from this drop-down list right
here or we can even create a new app service plan using this create new link.
So, the important point is, without an app service plan you cannot create app service.
This is because, it is the app service plan that defines the compute resources required
for your application to run.
So, how to create app service plan.
Well, just like any other resource in azure, one option is to create it inline right here
while creating our app service using this create new link or we can search for app service
plans in the azure portal
and then click this button - create app service plan.
As usual, the first two things are subscription and resource group.
Let's actually create a new resource group
Next, a name for our app service plan.
Common convention is to use the prefix "plan" and then followed by that a dash and then
the name of the app for which you're creating this app service plan.
In our case, we are creating it for our web application pragimtech.
So, I'm going to name it plan-pragimtech.
The operating system that you want on the underlying virtual machine - Linux or windows.
For now, let's just stick to windows and the region where you want this app service plan
to be created.
I'm going to select East US.
Next, pricing tier.
let's actually click this, change size link.
What we have here is spec picker and at the moment we see three workloads here - Dev/Test,
Production and Isolated.
At the moment, production workload is selected, and as the name implies we use this workload
for our production apps and within this workload we have several pricing tiers like S1, P1V2,
P2V2 and at the moment, we have S1 pricing tier selected and if we scroll down a bit,
pricing tier is important because it is the pricing tier that determines what you pay
and what you get.
Basically, the pricing tier you select determines three things.
As you can see features available.
In our case, we selected S1 pricing tier from the production workload, and we have these
features available - Custom Domains / SSL bindings, Auto Scale, Staging Slots, Daily
Backups and Traffic Manager integration.
Now, if you're new to these features and why we need them, please don't worry, we'll discuss
them in our upcoming videos.
For now, what you need to understand is, the features that are available depends on the
pricing tier you select.
In general, the higher the tier, the more features are available and obviously you also
pay more.
At the moment, we have this pricing tier selected S1 from production workload.
So we have all these features available to our application.
On the other hand, if we go to Dev/Test workload and then we have a free pricing tier here
and then if I select this, notice none of those features are available to our application.
So, if you want to be able to scale resources up and down depending on the demand for your
application you may want to select a pricing tier that supports auto scale feature.
With this free pricing tier, you cannot auto scale.
Next thing that the pricing tier determines is the included hardware, that is the hardware
resources that are available like memory, storage and the compute power also depend
on the pricing tier you select.
One thing I should point out here is, in azure compute that is CPU performance is compared
using something called Azure Compute Unit (ACU) for short.
With this free pricing tier, notice what we have under - Included hardware.
We have memory and storage.
How much memory we have?
We can see that in this box right here - 1GB memory, and how much disk storage space we
have?
Again 1 GB.
We also get 60 minutes of computing power per day.
Now, let's go to the production workload, select this s1 pricing tier and then scroll
all the way down.
As you can see, with this pricing tier we have all these features included for our application
and here is the included hardware.
We have dedicated azure compute units and to see how many units we have, scroll all
the way up and notice here in the box, we have 100 total azure compute units with this
S1 pricing tier, whereas if you look at this pricing tier P1V2, with this we have 210 total
azure compute units.
So, this pricing tier is almost two times more powerful from compute standpoint than
this S1 pricing tier.
How much memory do we have?
Well, 1.75 GB.
Now, let's scroll down.
Notice, this pricing tier supports auto scaling up to 10 VM instances.
Now, let's say based on the demand for your app and the scaling rules, you have four VMs
configured.
1.75 GB memory is per VM instance, so this means, you have four times 1.75 GB memory
available for your apps.
Storage 50 gigabytes.
If you want to you can run multiple applications using a single app service plan, but the important
point to keep in mind is, these hardware resources are shared by all the apps.
So, this means each app that is deployed in an app service plan gets a slice of computing
power that is azure compute units, memory and storage.
So, the pricing tier determines three things - Included features, Included hardware and
the price we pay.
To see the price we pay, scroll all the way up.
Notice, with this pricing tier S1, we pay 32.64 Great British Pounds per month and with
this pricing tier that is P1V2 we pay 108.82 Great British Pounds per month.
Now, there are few more useful and important concepts that we need to discuss regarding
these azure pricing tiers.
We'll discuss them in our next video.
That's it in this video.
Thank you for listening.