Now moving on to scale out. Now, scale out
pretty much is a concept that I explained
means that I am trying to bring in
additional instances
with same compute power and provide it for
my web applications.
The idea here is I can either do
a manual scale out just by dragging along
this
and the maximum number depends on the
pricing tier that you have. For premium
It's up to 30, so I can either do it
manually,
or, if I want to automate the whole experience
again, it's pretty simple to do that.
So what I do here is I say,
yes, I want to do it based on a metric.
Click on "Add a Rule", and you can see
what's the time aggregation that I
want to use for this rule to be triggered.
I want to use average.
What the metric? Let's keep it
simple. I want to do it based on a CPU
percentage.
So based on a CPU percentage,
I simply say, greater than. It could be
greater than or equal to, less than, equal
to, not equal to their different operations
that you can use. What's the threshold?
Now the threshold over here means that
if my CPU percentage is greater than
70% for a duration of 10 minutes,
please increase the count by one.
So that's what this rule is going to
do. And when I say cool down period,
that pretty much refers to the idea variant
before the next trigger of
this rule happens,
or before I get another additional instance.
Let's wait for five minutes. That's how
easy it is to create a rule.
You can see average CPU percentage more
than 70% increase my count by one.
You can add another scale condition this
time and say,
look, this time I want to do autoscale
based on schedule. Again, it could be
at specific start and end date,
or you could also repeat it.
Let's take a take a classic example.
I I have a web application,
which is used internally by my employees,
so probably I would say that during the
weekdays,
maybe I want a maximum of
10 and a minimum of five.
Of course,
in this case,
my default should be between maximum and
minimum. Again,
not only the days I could even define the
time for which I want this to happen,
otherwise it goes back to default.
That's another way of
scaling out your web applications.
I can hit "Save"
and that's it.
Now whenever these conditions are met,
my web applications will auto scale out.
That's about
scale up and scale out.
Now, let's look at some other properties under
the Configuration tab here.
If I go here,
I click on "General Settings",
You can see this is where you can switch
on or off, always on.
Currently it's off.
I can say, always on to.
Right now,
the ARR cookie is switched on which
pretty much means that for the same session,
the request will land on the same instant
of Azure App Services,
I mean, my App Service plan.
Now, if I have more than one instance available
in my App Service plan and,
my web application is pretty much stateless
in nature.
I really should have it as "off"
so that now my incoming requests can
be distributed across multiple instances.
Hit, "save."
You're good to go.
Now, the other idea,
as I said earlier was to,
pretty much talk about
"how do I configure local cache?"
You do that by going to application settings,
and you can see I need a new application setting.
And then you create a setting called
WEBSITE_LOCAL_CACHE_OPTION,
and
give it a value of ALWAYS.
That means I want my site
to use the local cache.
That's one setting.
The second is I can also set the size
of the local cache that I want to use.
Again,
I do that using another application setting.
I say WEBSITE_LOCAL_CACHE_SIZEINMB
and I say 1000,
which is almost a gig.
That's how I enabled local cache for
my web application.
Now the next in the next in line is
the Front Door.
If you remember,
I spoke about Front Door being the HTTP
or rather,
a global HTTP load balancer based on
DNS for my web application.
In a scenario where I have the web application
codebase hosted,
let's say in in in East U.S.,
it's hosted in North Europe.
It's hosted in Southeast Asia,
so I have these different locations where
my same web application is hosted and what
I want is I want my user to be automatically redirected
or routed to a geographical location
which is closest to them.
That's what the Azure Front Door
will provide for me
and and it's very simple to configure.
I mean, this is the Front Door experience itself
where I have,
the Front Door Frontend, domains,
and the default backend pool defined,
and I can again come back and define all
the rules that I want.
This is where I can figure for the web
application Firewall.
And again,
it is a set of manage rules which are
already defined for you.
As you can see,
you can even have your own custom rules
if you want.
Now, how is this whole thing
pulled together for my web application?
That was the whole Front Door experience.
Now, in terms of hooking this onto my
web applications,
it's very simple.
Look, I already have created, or
I have already integrated my web application
with this whole Azure Front Door
instance.
Otherwise,
it's just to drop-down and you select
the name of your Front
Door instance
to have your web application
use the capabilities of Azure Front Door.
That's around
Azure Front Door.
Similarly,
when I talk about CDN,
the whole idea is that you first create
a CDN profile and within a CDN profiling,
go ahead and create the endpoint. Now, again
on CDN,
one very important point to remember is
that Microsoft again is very uniquely positioned
where we provide you different options in
terms of CDN providers.
So you have the Microsoft CDN option,
you have the horizon,
and you have command - and it's
up to you, based on your needs and requirements,
to choose the right provider for you.
Once you have the CDN
Once you have the CDN profile and
endpoint created, again,
you can even get to your custom
domain
configured for your CDN
endpoint.
You can define what
formats you want to compress.
You can even define caching rules.
If you want to have scenarios where you
want your application to be available only
to a certain set off geographies of countries,
you can do that using geo-filtering.
You can say that
what kind of optimized do you want?
For your web application right sized
just general web delivery.
But for horizon option,
you also get options around
the media and you can even define rules
if you want.
so you can define if my device type equals
mobile, add an action.
Maybe I can have a different cache expiration
if it's a mobile,
incoming requests is from a mobile or
I could do a URL redirect.
Some of
these are all different capabilities that
you can set up. Now,
the idea again here for CDN is
that now CDN takes care of delivering that
static content for the web application,
which could be emitted
or sometimes images can be really heavy.
It could be videos, which could again be
certain, which could be a multiple gigabytes.
That's the kind of performance optimization,
that you can get by delivering your
content from
edge locations,
closest to your customers, rather than
having the round trip all the way back
to the origin for your
web applications.
And again,
how do I configure it? Very simple,
because they already had one.
It's configured otherwise from within
the
Azure App Services experience,
you can always go and then create a
new endpoint.
Look at the example here.
I can choose
"what's my provider?"
Give it a name,
Give it the origin, and good to go.
That's how easy you can configure
Azure CDN.