2.12 Virtual Machine High Availability and Scale Sets

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or

Already have an account? Sign In »

Time
18 hours 43 minutes
Difficulty
Intermediate
CEU/CPE
9
Video Transcription
00:00
>> Welcome back. In this episode,
00:00
we're going to discuss Virtual Machine
00:00
High Availability and Scale Sets.
00:00
My learning objectives include understanding
00:00
high availability and then understanding scale sets.
00:00
First, what are availability sets?
00:00
Availability sets provide
00:00
a grouping capability in order to
00:00
place virtual machines resources
00:00
away from each other when deployed.
00:00
The virtual machines and an availability set are
00:00
deployed across multiple physical servers,
00:00
racks, storage,
00:00
and network components inside the Azure data center.
00:00
If a failure happens,
00:00
not all of the VMs in the
00:00
availability set will be impacted,
00:00
leaving some online to
00:00
continue serving up the application.
00:00
This provides redundancy for the application and keeps it
00:00
available for end-users to
00:00
continue consuming the application.
00:00
Each tier of the application should be
00:00
placed into their own availability set.
00:00
The virtual machines are divided up across
00:00
infrastructure through fault domains and up domains.
00:00
Fault domains can be looked at as racks of servers.
00:00
Each rack uses resources like network and
00:00
power putting virtual machines into an availability set,
00:00
puts the VMs on
00:00
different host in different racks in the data center.
00:00
If a rack were to experience a failure,
00:00
not all its virtual machines would be affected.
00:00
Likewise, update domains allow
00:00
for upgrading or performing maintenance on
00:00
an application and ensuring
00:00
other components of the application are not affected.
00:00
Each update domain is taken down one at
00:00
a time to perform the maintenance
00:00
before moving on to the next domain,
00:00
when virtual machines are deployed
00:00
in an availability set,
00:00
they'll have 99.95 percent
00:00
Azure service level agreement or SLA.
00:00
This means they should only experienced downtime
00:00
roughly four hours and 20 minutes in a year.
00:00
One less thing to note
00:00
is when creating a virtual machine,
00:00
that is the only opportunity you'll have to
00:00
place it into an availability set.
00:00
Once the virtual machine is created,
00:00
you will not be able to place it
00:00
into the availability set.
00:00
This means you're going to have to
00:00
do some planning before creating
00:00
your virtual machines by
00:00
creating the availability set ahead of time.
00:00
Next, let's talk about scale sets.
00:00
Scale sets are groups of
00:00
identical virtual machines typically
00:00
sitting behind a load balancer.
00:00
What we can do is automatically
00:00
increase or decrease the number of
00:00
these identical virtual machines based
00:00
on demand of the virtual machine and the set.
00:00
For example, if the web front end of
00:00
your application is experiencing increased CPU load,
00:00
the scale set will respond automatically by
00:00
creating additional identical virtual
00:00
machines inside the set.
00:00
Once this demand subsides,
00:00
the additional VMs are deep provisioned.
00:00
Scale sets provide additional application availability
00:00
by being able to respond to this additional load,
00:00
but also resiliency so the application stays responsive.
00:00
A common example would be if you
00:00
hosted an e-commerce site and
00:00
we're expecting additional traffic
00:00
on Black Friday after thanksgiving.
00:00
As demand on your site application increases,
00:00
you don't have to worry about provisioning
00:00
additional servers to meet the demand.
00:00
The scale set will respond and do that for you.
00:00
Once demand dies down,
00:00
those additional virtual machines
00:00
are automatically removed.
00:00
Now that we have an understanding of
00:00
availability sets and scale sets,
00:00
let's jump back into our Azure portal and
00:00
see how these are deployed with our virtual machines.
00:00
Here we are back in our Azure portal.
00:00
Let's go ahead and click on Create a resource.
00:00
Search for availability set and click on Create.
00:00
Now we need to give our availability set a name.
00:00
I'm going to create this one
00:00
for our production web servers.
00:00
Next, I'll choose our existing resource group
00:00
for the VM demo.
00:00
We're going to keep our location as East US.
00:00
Then next we get to choose the number of
00:00
fault domains we want these
00:00
virtual machines deployed across,
00:00
as well as the number of update domains we want
00:00
to deploy these virtual machines
00:00
across during planned maintenance activities.
00:00
For now, we'll just leave this at
00:00
the defaults and go ahead and click on Create.
00:00
Now that our availability set is created,
00:00
let's go see how it is
00:00
incorporated when we create a virtual machine.
00:00
Now, while creating the virtual machine,
00:00
I do need to select the same resource group
00:00
that the availability set was deployed to.
00:00
Let's select VM demo.
00:00
I'm going to skip the rest of these,
00:00
but let's go back to our availability options here.
00:00
In the previous episode,
00:00
we skip this option because
00:00
we didn't require anything for the demo.
00:00
But now we should be able to select this drop-down.
00:00
Click on availability set.
00:00
This is going to bring up a new option.
00:00
In here you'll see
00:00
our prodWeb-AVSet that we just created.
00:00
Now when we deploy this virtual machine,
00:00
it will be deployed across
00:00
the availability set we created based on
00:00
the number of update and fault domains
00:00
and any other virtual machines we
00:00
create into the same availability
00:00
set will be spread across those domains as well.
00:00
That way, these virtual machines will be highly
00:00
available across multiple domains for our application.
00:00
Next, let's take a look at creating a scale set.
00:00
Again, let's click on Create a resource.
00:00
Search for scale sets and click on Create.
00:00
First, like most of
00:00
our other Azure resources, we need to give it a name.
00:00
I'm going to focus on our production web servers.
00:00
The rest of these options are defining what type
00:00
of virtual machine we're going to
00:00
be deploying in the scale set.
00:00
If you remember from the slides,
00:00
all the virtual machines
00:00
inside the scale set are identical.
00:00
Basically we're defining
00:00
the virtual machine image, subscription,
00:00
resource group and location,
00:00
as well as setting the username and password
00:00
for the virtual machine inside the scale set.
00:00
Next, we're going to define how many instances of
00:00
the virtual machine we want
00:00
initially inside the scale set.
00:00
For this example, I'm just going to stick with one.
00:00
Next are our auto-scaling options.
00:00
This is where we can define how we want
00:00
our virtual machines to auto-scale inside the scale set.
00:00
Let's go ahead and select on enable.
00:00
We're going to define the minimum number of VMs we want,
00:00
as well as the maximum number of
00:00
VMs inside the scale set.
00:00
As well as how we want to scale out and scale in.
00:00
Here, we have it based on
00:00
CPU threshold percentage of 75 percent.
00:00
Once that first virtual machine hit 75 percent,
00:00
we're going to start increasing the number
00:00
of virtual machines by one.
00:00
After that, if the virtual machine
00:00
CPU scales down to 25 percent,
00:00
we're going to start decreasing the number of
00:00
VMs we have inside the scale set.
00:00
Now for networking, I mentioned
00:00
typically these virtual machines are going to
00:00
be behind some type of gateway or load balancer.
00:00
But for right now, we're just going to select none.
00:00
We're going to select
00:00
our virtual network to deploy these two,
00:00
as well as the subnet.
00:00
Let's go ahead and sign a public IP address per instance.
00:00
That does it for the settings
00:00
I want to worry about right now,
00:00
let's go ahead and click on Create.
00:00
Now let's jump over to our scale set
00:00
and check on its deployment.
00:00
We can see the status is
00:00
succeeded with one instance currently running.
00:00
Let's go into its properties.
00:00
Let's go check out our current instances under settings.
00:00
Here we can see the first VM in
00:00
our scale set is automatically deployed.
00:00
Next, let's go back and check out our scaling settings.
00:00
This is where we have the auto-scaling options set.
00:00
We also could put a manual scale and we could come in
00:00
here and manually scale up and down as needed.
00:00
When we created the scale set,
00:00
we only had an option of setting based on CPU,
00:00
but we can also set other scale conditions.
00:00
Let's go check this out.
00:00
Let's add a rule for this scale condition.
00:00
Here we have other metrics we can
00:00
base this scale rule on,
00:00
such as disk performance and network performance.
00:00
That does it for this demo,
00:00
let's jump back over to the slides and wrap this up.
00:00
That does it for this episode.
00:00
Coming up next, we're going to discuss
00:00
Azure Resource Manager Templates or ARM
00:00
Templates and how they can be used to
00:00
deploy our resources we learned so far,
00:00
like virtual machines, networks, and storage accounts.
00:00
See you in the next episode.
Up Next