Hello and welcome back to Siberia's Microsoft Azure Administrator. A Z 103 course, I'm Will Carlson. And this is Episode 32 about virtual machines scale sets. In today's episode, we're gonna talk about what? The use cases for a virtual machine scale set. What? It is, what it really does.
We're also gonna discuss some of the limitations and configuration considerations that
our inherent upon a scale set based on the number of virtual machines that you need to contain in it.
And then we're gonna deploy a virtual machine scale set through portal
to go ahead and get started. We're gonna jump right into portal and search here at the top for virtual machine scale sense
and click on that. We can see there are none currently deployed, but we can add one here.
Now, as with most resource is here in Azure, we're gonna need to name the resource.
I'm gonna leave this as 2016 data center for now in my free trial and create a new resource group.
I'm gonna change this for illustration to us South Central,
and we can see that anger is warning us that there are no availability zones in this particular region, and that's what we saw in the previous episode.
So if I want to use an availability zone with my scale set, I can leverage both of these technologies to further enhance my high availability and my scalability.
I can go ahead and select which availability zones. I want this scale set deployed into
or ultimately to deploy virtual machines in two. And I consumes all three or one which is not highly available.
I'm gonna go ahead and set a user name here password,
and that gets me down in here into the instance, Count. And if we tool tip over this, we can see that this is going to be the number of virtual machines started up at boot in this scale set. This isn't the maximum amount of machines, and this feels that this is going to be how many are started when we start the scale set up
so I can go ahead and set that to be one, assuming that we don't need any scalability just yet
and that gets us down into the more advanced options, I'm gonna go ahead and select show advanced settings,
and we can see here that we can enable scaling beyond 100 instances. And what this means is that scale sets typically deploy into a single placement group, and a placement group is somewhat equivalent to the concept of an availability set that we talked about previously.
And one placement group on Lee supports up to 100 virtual machine instances
in the event you need more virtual machines for your scale set than that. You can sit this
too. Yes, as it is right now, and that gives us the concept of a large scale set. So this scale set right now as configured could scale up to 1000 instances of a virtual machine.
That one caveat there has to do back up here with the system disk image that we chose. We can only launch up to 1000 instances in a scale set. If we use a virtual or a system disk image from the azure marketplace, that's what this is. If we wanted to deploy a Custom OS image,
we would be limited to Onley 300 virtual machines in the scales that if we did that,
we're gonna go ahead and select this to know we're not gonna need over 100 instances.
Something else here has to do with a spreading algorithm, and this is going to dictate how the virtual machine instances are spread across basically fault domains or the placement groups themselves. Fixed spreading means that I select how many
placement groups I want to use at minimum now. This could be particularly touchy if I've selected a region that doesn't have as many
placement groups is, I would like then the deployment is simply going to fail if I select Max spreading. That gives Azure a little more control over what that looks like. But again, that may not be as many placement groups as I would ultimately like.
This option here about evenly balancing across zones is very similar to the spreading algorithm, and that just essentially means that Azure is going to be forced to evenly balance all of your instances across placement groups. If it cannot do that, it's gonna cause the deployment to fail.
However, if we leave it set to know, Azure can change things as it needs to, but we lose a little bit of control
right now. We have auto scale disabled, but let's go ahead and enable that because one of the glories and the beauties of a scale set is that it automatically expands and contracts as load dictates.
So if we said this to enabled, we see that we can set the minimum number of e EMS and the maximum number. So we're good with 1 10 maybe. All right, let's just go ahead and say 100 the scale out numbers here have to do with when the scale set is going to grow. So if our CPU threshold is over 75%
we're gonna add one additional virtual machine
and then when the average CPU threshold is below 25% we're gonna go ahead and decrease by one virtual machine. And that's the magic of how a scale set automatically expands and contracts to handle the load coming into it.
Now, down into networking. We have a couple of options here for the way that we handle the traffic coming into our scale set. And those are an application gateway in the load balancer.
We'll talk more about these individually during the networking sections of the course, but for now, understand that an application gateway is only gonna handle https http and Web socket traffic, Web based traffic and a load balancer is gonna be ableto handle any traffic whatsoever, both internal and external.
I'm gonna go ahead and select load balancer here
and they give us the option to set up the public I p address. This is just a name here for our internal use,
and then this name here is going to be the public D N s. So as such, it has to be unique. We could also come in here and select the virtual network that we want this scale set to be a part of or create a new one. Gonna create a new one here real quickly, except the defaults will select. Okay, we can assign a public I p address to each of our virtual machine instances.
You have a need to do that. You can turn it on. We're gonna leave it off here.
And then we talked about these other two components of management in a previous video. And now that the configuration is all done, I simply select create.
And now that we've given that deployment sometime to run, we can see that our virtual machine scale set is all set up. This deployment is a rather lengthy one. But when we consider what all azure is having to do behind the scenes, it really makes a whole lot of sense.
Not only do we set up the entire scale set, but we've also gone ahead and set up the initial B m. All the networking and all of the other resource is that are required.
If we come over here to resource groups
and I go to the resource group that I created for this deployment, you can see the number of resource is that are currently here.
But back where we were,
when I collect down into the virtual machine scale said itself, I can see and configure a number. The functions here of the scale set of particular interest is going to be the instances blade of the V in scale set where I'm gonna see how many instances are currently running and their health. Right now I see that I've only got the one instance up and running that I initially configured.
You're in scaling. I can go ahead and change the scaling rules as I need to. If they're not working out the way that I want, either by changing the average CPU up or down, depending on my use case
and because this is a virtual machine, just like all of the others that we've set up. We also see some similar options here. We see size where we can come in and change the size of the virtual machine. We also see extensions where we can go in and do some post deployment extension work,
along with all of the other functionality that is given to us via a virtual machine. But the magic of a virtual machine, scale said, is once we get everything set up
and his load increases or decreases if we have auto scaling turned on the virtual machine scale set does all of the work of making sure that we have the resources to handle the traffic that's incoming.
So in today's episode, we talked how we use a virtual machine scale set to help us manage increasing and decreasing traffic and a scalable in an automated way. We talked about a number of the limitations of virtual machine scale sets, so 100 per placement group, or if we open that up,
we can have up to 1000 virtual machine scale sets. But remember, that's on Lee. If you use a marketplace image,
if you use a custom image, you're limited to 300 v EMS. There's also a limitation to the number of E EMS based on the type of load balance or that you use. We'll talk about load balancers again in the networking section, but the basic load balancer only allows up to, ah 100 virtual machine instances in a scale set.
We went through the process of deploying a scale set, which is relatively straightforward, especially when we consider all of the work that goes into making a scale set Run
coming up. Next, we're gonna talk about a really interesting piece of really interesting service rather here in azure azure site recovery.
Thanks so much for joining me today.
Let's get into the next video