Virtual machine scale sets
In this video we will understand Azure Virtual Machine Scale Sets. These are commonly know by the acronym VMSS (Virtual Machine Scale Set).
What is a Virtual Machine Scale Set (VMSS)
A Virtual Machine Scale Set lets us easily create and manage multiple virtual machines.
Why do we need a Virtual Machine Scale Set
Let's understand this with a simple example. Consider a typical 3-tier application.
It's very common to have multiple web servers in the web tier and multiple application servers in the business tier. In this example, we have 4 web servers in the web tier and 4 application servers in the business tier. In real-world though, depending on the traffic and demand for your application, you may have many many web servers and application servers in the respective tiers.
Consider GMAIL.com for example. It has over a billion users world-wide. To be able to handle and process all these users requests, I wouldn't be surprised if they have thousands of web servers and business servers.
Now, one important point to keep in mind is, when we have many VMs that run our application, it's important to maintain a consistent configuration. For reliable performance of the application, the VM size, disk configuration, and any software that you install, like your application itself and it's dependencies, should match across all VMs.
Imagine the amount of time and effort it takes to create all these thousands of servers manually, one at a time. It's not only time-consuming, monotonous, and tedious but also error-prone.
This is a perfect scenario for using Virtual Machine Scale Set (VMSS)
Virtual Machine Scale Set (VMSS) - Important points
- A Virtual Machine Scale Set lets us easily create and manage multiple virtual machines.
- All VMs in a scale set are identical, meaning they are created from the same base operating system image and configuration. Obviously, this approach lets us easily manage hundreds of VMs without additional configuration.
- For traffic distribution, an Azure Load Balancer is also deployed along with the virtual machines in a scale set. There is no need to manually create the virtual machines or the load balancer. Just imagine the amount of time it saves.
- Even better, with the auto-scale feature, the number of virtual machines can automatically increase or decrease in response to demand. You can use metric based auto-scaling. There are many metrics from many sources in azure. For example, if the CPU utilization is over 70%, increase the VM instance count by 1. Not just scaling out, we can also auto-scale-in, when the demand subsides. For example, if the CPU utilization falls below 20%, decrease the VM instance count by 1.
- We can also increase or decrease the number of VMs in a scale-set based on a defined schedule. For example, let's say, next week, we are launching a new product or a business lines. So starting next week, we are going to have a heavy peak for 3 days. For this we can define a set schedule. For example, at 9:00 AM on Janury 1 increase the VM instance count to 50 and at 9:00 PM January 3, when our peak ends, bring the instance count back to our baseline configuration. How cool is that.
So, there are 3 ways to increase or decrease VMs in a scale set. Manually through the Azure portal or many of the azure APIs that are available. Auto scale based on metrics or a defined schedule.
No comments:
Post a Comment