Ijaw Dictionary Online

How Automobiles Work

In this module, we are going to talk about
application services in Azure and how to auto-scale with those. There’s been some recent updates
to our UI as well as some of the features that we have in Auto-scale, so I thought it’d
be good to kind of step back and think about what actually is Auto-scale trying to do for
us, what can it and can’t do for us and what the UI looks like for how to control
this and configure this in Azure. Let me cut to a PowerPoint here and just show
you briefly, this is what we’d be looking to achieve. So in this case we have – and
we’re just going to use artificial names here – but we’ll say we have three instances
of a web app running here, right, and what we’re looking to do is basically scale this
out so we can create more instances. So right now maybe we have three instances running,
so all our traffic is coming in here; it’s being load-balanced across this entire cluster
that we have here and the idea is to be able to scale and be able to create more over here,
so we’ll call that 3, and over here, we will create web 4. So we can continue to add
instances and what this is called is it’s called scaling out as opposed to scaling up.
When we take a look at our portal, I’ll show you the difference between the two but
essentially what we’re saying is we are not going to scale the CPU, the memory or
that kind of thing with this application, we are actually going to create more instances
of it. And as long as our application can handle that – typically a stateless-type application
can handle that very well – it gets added to load balancer, and we actually can spread
the load over more instances and achieve scale-out for our application.
So if we pop over to our portal: in the portal – and we’re in the new portal here, this
is our current gen portal and not the one that’s been retired now or is kind of being
sunset is the manage.azure.com, you’ll notice we’re at portal.azure.com – clear distinction
just to make sure you are in the right portal. When you are in the portal on the left here
we have this nice selector and one of the things that’s there by default is App Services.
Now I’ve stood up a web application here and the thing to remember about app services
is it’s not just app service, it’s basically encompassing a service plan that we’re going
to have, which basically means how big is the machine we’re going to run this on and
inside of there we can create web applications, mobile applications, and API type of applications.
So I have a website that’s already set up here, a web application, and you can see that
my service plan – if we zoom in on that real quick, you can see right here is my service
plan, you can see I’m under a standard skew right now, an important distinction. So when
you come in here, Settings should open by default but if it doesn’t; you just click
on the Settings button. And what happens is if we scroll down here to this section – now
right here for the App Services plan – so basically we can configure and change our
App Service plan on the fly. So if we didn’t like what we provisioned it under originally
or maybe we need to make it larger like we do when we scale the CPU up, we can come in
here and take a look at what the metrics are and how our site is performing but more importantly,
if we hit the scale up option right here, you can see we get all the skews here, so
we actually have – right here is our premium tier, and then we have a standard tier here,
and then down at the bottom we have actually have a basic tier which doesn’t do auto-scaling
and you can tell right here – I’ll actually zoom in so you can see that – but, like,
you can see it says up to three instances manual scale. So in this case we can’t automatically
do it; we could do it manually. These other offerings from standard and premium tiers
actually give us the ability to do auto-scale. So you notice that we don’t scale up so
we don’t scale between standard and premium. That’s something you would decide beforehand.
We do scale out so when we click on the scale out option here, you can see that we do have
some options that I once set up here right now – we will create some more here – you
can see that we’re scaling by CPU percentage and in my case I just set it arbitrarily to
59%. So if my average CPU is 59% or more, we’re going to go ahead and scale up and
we can actually drag this slider to say how big do we want it to go. So how many more
instances do we want to create? 3, 4, 5 and we can go up to 10 here. We can do all kinds
of different things with the scaling if we actually change this option. So right here,
you see that we can do it manually and this would be something for the basic tier or if
you don’t want to do auto scaling. You can come in here and manually do that by yourself
or through the API. You can also scale by CPU which I have already showed you. You can
also do one that kind of does both; so in this case you can see that I have some settings
in here for CPU that is going to increase and decrease the instance counts but we can
also click on this add profile up here. What’s interesting here is that we can create things
for like weekday, let’s say. So let’s say during the weekend maybe we don’t receive
a lot of load but this is a line of business type application and we know Monday through
Friday is when actually we want this stuff to happen. So in that case we can actually
come in and pick the days that we want this to apply. So not only are we scaling by CPU,
we can also scale by days or by a specific fixed date range. So we have a reoccurrence
here that says let’s do it every Monday through Friday; if we wanted to do that we
could do something like that. We can also schedule the times and then we can do a fixed
day too if we said we just want to scale between these times. Maybe we were doing a new release
and we actually want to expose and have this thing really performing while thing is being
launched because we know there’s going to be a huge influx of users using this site
so in that case we would set something like a special case there and we can have multiple
of these in here. And you will notice in the portal we can also – if I can go ahead and
cancel this – you will also notice that we can also do emails on the scale actions.
So this is part of our learning system inside Azure, to not only allow you to do auto scaling
but it also allows you to email and notify people like administrators or co-admins. So
that you are aware of what charges are being happening here, how big this thing is actually
scaling so that they can keep track of that. One of the things I wanted to show you is
when you saw on the UI that we set up the CPU, we actually have another way to kind
of come in there. So once you have the settings set up, you can hit just Add Rule – let
me just circle that so that you can actually see it. It doesn’t look like a hyperlink
but if you click on that you can adjust the little scale rule slide out over here and
in here, you can actually select a lot more. So you can select not just CPU, you can also
select memory, disc queue length, all kinds of different things. And these will change,
you know, according to that so we can basically set our thresholds of high and low. And you’ll
notice that we can actually set a cool-down as well, which is interesting because scaling
is an interesting animal because when we actually do auto-scaling it’s not just as simple
as saying hey, when you see the CPU hit 70% go ahead and scale up; that would be a horrible
scaling metrics because basically sometimes if you look to the system, the CPU could spike
there for a second or two and you don’t want to be triggering it to scale up or scale
down really quickly. That would actually cause disruption in the service, and so you need
to kind of govern that or kind of even that flow out a little bit so we’re not scaling
up or down so rapidly. And that’s what this cool-down allows you to kind of tweak. And
so that completes the module 1 app services and how to use the new auto-scaling features
in the portal to scale your app services.

Leave a Reply

Your email address will not be published. Required fields are marked *