7 hours 58 minutes
Welcome back. In this episode, we're gonna discuss virtual machine, high availability and scale sets.
My learning objectives include understanding, high availability and then understanding scale sets.
So first, what our availability sets availability sets provide a grouping capability and order to place virtual machines. Resource is away from each other. When deployed.
The virtual machines and an availability set are deployed across multiple physical servers, racks, storage and network components inside the as your data center. If a failure happens, not all of the V EMS in the availability set will be impacted, leaving some online to continue serving up the application.
This provides redundancy for the application and keeps it available for end users to continue consuming the application.
Each tier of the application should be placed into their own availability set. The virtual machines are divided up across infrastructure through fault domains and up domains.
Fault domains can be looked at as racks of servers. Each rack uses resource is like network and power. Putting virtual machines into an availability set puts the V EMS on different host in different racks in the data center.
If Iraq were to experience a failure, not all of the virtual machines would be affected. Likewise, update domains allow for upgrading or performing maintenance on an application and ensuring other components of the application are not affected. Each update domain is taken down one at a time to perform the maintenance before moving on to the next domain.
When virtual machines are deployed in an availability set,
they'll have a 99.95% azure service level agreement or S L. A. This means they should only experience downtime roughly four hours and 20 minutes in a year. One last thing in the note is when creating a virtual machine that is the only opportunity you'll have to place it into an availability set.
Once the virtual machine is created, you will not be able to place it into the availability set. This means you're gonna have to do some planning before creating your virtue machines. By creating availability set. Have a time
next. Let's talk about scale sets. Scale sets are groups of identical virtual machines, typically sitting behind a load balancer. What we can do is automatically increase or decrease the number of thes identical virtual machines based on demand of the virtual machine and the set
For example, if the Web front end of your application is experiencing increased CPU load, the skill set will respond automatically by creating additional, identical first machines inside the set.
Once this demand subsides, the additional V M R D provisioned
skill sets provide additional application availability by being able to respond to this additional load but also resiliency so the application stays responsive. A common example would be if you hosted an e commerce site and we're expecting additional traffic on Black Friday after Thanksgiving
as demand on your site application increases, you don't have to worry about provisioning additional servers to meet the demand.
The scale set will respond and do that for you. Once demand dies down, those additional virtual machines are automatically removed. Now that we have an understanding of availability sets and scale sets, let's jump back into our azure portal and see how these are deployed with our version machines.
Here we are, back in our azure portal. Let's go ahead and click on Create a Resource
search for availability set
and click on Create.
Now we need to give our availability, set a name. I'm gonna create this one for our production Web servers.
Next, I'll choose our existing resource group for the VM demo,
and we're gonna keep our location as East us and the next we get to choose the number of fault domains. We want these virtual machines deployed across, as well as the number of update domains. We want to deploy his virtual machines across during planned maintenance activities. For now, we'll just leave this at the defaults and go ahead and click on Create.
Now that our availability set is created, let's go see how it is incorporated. When we create a virtual machine
now, while creating the virtual machine, I do need to select the same resource group that availability said was deployed to select select VM Demo.
And I'm going to skip the rest of these. But let's go back to our availability options here.
In the previous episode, we skipped this option because we didn't require anything for the demo. But now we should be able to select this drop down click on availability set
that's gonna bring up a new option. And in here you'll see our prod Web, a V set that we just created.
Now, when we deploy this virtual machine will be deployed across the availabilities that we created based on the number of update and fault domains and any other virtual machines we create into the same availability set will be spread across those domains as well.
That way, these virtual machines will be highly available across multiple domains for our application.
Thanks. Let's take a look at creating a scale set again. Let's click on, create a resource
search for scale sets
and click on create.
And First, like most of our other azure resource is, we need to give it a name. I'm gonna focus on our production Web servers
And the rest of these options are defining what type of virtual machine we're gonna be deploying in the scale set.
Remember, from the slides, all the virtual machines inside the scale set or identical. So basically were defining the virtual machine image, subscription resource group and location as well a set in the user name and password for the virtual machine inside the scale set.
Next, we're gonna define how many instances of the virtual machine we want. Initially inside the skill set for this example, I'm just gonna stick with one
next our auto scaling options This is where we can define how we want our virtual machines to auto scale inside the scale set. Let's go ahead and select on enable
we're going to find the minimum number of E EMS we want, as well as the maximum number of E EMS inside the scale set
as well as how we want to scale out and scale in
here. We have it based on CPU threshold percentage of 75%.
Once that 1st 1st machine hit 75% we're going to start increasing the number of virtual machines by one. And after that, if the virtual machine CPU scales down to 25% we're going to start decreasing the number of Ian's we have inside the scale set.
Now for networking, I mentioned. Typically, these virtual machines are gonna be behind some type of gateway or load balancer. But for right now, we're just gonna select none.
We're gonna select our virtual network to deploy these two
as well as the sub net.
And let's go ahead and sign a public I P address per instance
that does it for the settings I want to worry about right now. Let's go ahead and click on Create.
Now let's jump over to our scale set and check on its deployment,
and we can see the status is succeeded with one instance currently running. Let's go into its properties.
Let's go check out our current instances under settings,
and here we can see the first PM and our scale set is automatically deployed. Next. Let's go back and check out our scaling settings,
and this is where we have the auto scaling option said. We also could put a manual scale and we could come in here and mainly scale up and down as needed.
When we created the skill set, we only had an option of setting based on CPU. But we can also set other scale conditions.
Let's go check this out.
Let's add a rule for the scale condition
and here we have other metrics weaken base this scale world on, such as Dace performance and network performance
that does it for this demo. Let's jump back over to the slides and wrap this up
that does it for this episode. Coming up next, we're going to discuss azure resource manager templates or armed templates and how they could be used to deploy our resources. We learned so far like virtual machines, networks and storage accounts.
See you in the next episode.