<img alt="" src="https://secure.leadforensics.com/150446.png " style="display:none;">
Go to top icon

Virtual Machine Scale Set in Azure Microsoft

Surbhi Agarwal Jan 16, 2020

Microsoft Azure Virtual Machine Virtual Machine Scale Set VMSS

Virtual Machine Scale Set, an interesting service offered by Microsoft Azure, helps to create and manage a group of identical, load balancer Virtual Machines (VMs). The number of VM instances can automatically increase or decrease based on scheduled conditions.

Scale Sets are used to run multiple instances of an application and even if a problem arises, the customers can continue to access the application through one of the other instances with minimal interruption. Thus, Scale Sets provide high availability to your applications, and allow you to centrally manage, configure, and update many VMs.

We can also use the Availability Zone to automatically distribute VM instances in a Scale Set with a single datacenter or across multiple datacenters. With the help of Virtual Machine Scale Sets, we can build large-scale services for areas such as compute, big data, and container workloads. A Scale Set can have around 0 to 1000 VMs based on platform images and around 0 to 600 VMs based on custom images.

Difference between Virtual Machine and Virtual Machine Scale Set

  • It is true that Scale Sets are built from VMs. If we want to add additional VM instances, VM Scale Sets automatically create it from central configuration, traffic balancing and distribution, high availability and redundancy and scaling of VM whereas for normal virtual machine all these are manual processes.
  • For scaling of VMs we need to manually monitor and use Azure automation whereas for Virtual Machine Scale Set, auto scale is based on host metrics, in-guest metrics, Application Insights and schedule.

Best Way to reduce cost when you go with VMSS

It is said that Virtual Machine Scale Set is costly but there are ways to optimize the cost. If you are just testing, deploy VMSS with no auto scale. For the dev environment we can use VMSS with auto-scale with general purpose VMs and finally for production environment we can go with a combination of Low Priority and General purpose VMs, and auto Scale. We only need to pay for the underlying compute resources such as the VM instances, load balancer, or Managed Disk storage. The management and automation features, such as auto scale and redundancy, incur no additional charges over the use of VMs.

How to create Virtual Machine Scale Set from Azure Portal:

1. First, login to your Azure portal and select Create Resources and search for Virtual Machine Scale Set. A page similar to the one shown below will appear.

vm-scale-set

2. Click on ‘Create’. A page similar to the one shown below will appear. Fill in the required details:
  • Give the Virtual Machine Scale Set a name.
  • Select Operating system disk image. You can select private or public images as per your requirement.
  • Select your Subscription name.
  • Create new or existing Resource group.
  • Give the Location where you need to create the VMMS.
  • You can select Availability Zone as per the requirement.
create-page
  • Enter username, password and confirm password.
  • Select instance count and size as per requirement.
  • Click on ‘Use managed disks’ option.
create-page-1
create-vm-scale-set
  • Auto scale can be either Disabled or Enabled
autoscale
  • We can choose Load balancing options as per the requirement.

load-balancing

load-bal
  • In Management we need to opt for Boot diagnostics and choose its storage account.
boot
  • Now click on Create. Your VMMS will be created as shown below:

vmms

VMSS real world best practices which we can follow:

  1. We should use DevOps to deploy images on Virtual Machine Scale Set, a process made easier with the help of packer tool
  2. For hosting any web-based app, VMSS should be our default choice because scaling is easy and automatically done as we schedule the conditions
  3. Always deploy a dedicated subnet for VMSS
  4. We should use PaaS DB offerings with Virtual Machine Scale Set, and should not go with VMSS to host DB
  5. We should use Azure ARM Script to deploy VMSS as it offers more flexibility and control
  6. For DR we should deploy another set of VMSS in cross region or cross zone. The DR should always be Active-Active and not Active-Passive
  7. We should create base images with web servers and for code changes we can use Azure File share for all VMSS VMs
  8. We can use PowerShell or Azure CLI for updating the applications
  9. We should not do backup for Virtual Machine Scale Set
  10. We should not login to the VM unless it is necessary

Additional References:

https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-faq

https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/quick-create-portal

https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview

e-Zest is a leading digital innovation partner for enterprises and technology companies that utilizes emerging technologies for creating engaging customers experiences. Being a customer-focused and technology-driven company, it always helps clients in crafting holistic business value for their software development efforts. It offers software development and consulting services for cloud computing, enterprise mobility, big data and analytics, user experience and digital commerce.