Understanding the Benefits of the Azure Virtual Machine Scale Set (VMSS) (2024)

TheAzureVirtualMachineScaleSet (VMSS)letsyou create and manage a group of load-balanced VirtualMachines(VM). The number of VM instances can automatically increase or decrease in response to demand or defined schedules. Scale sets provide high availability to your applications and allow you to centrally manage, configure, and updatea large number ofVMs.Witha VMSS, you can build large-scale services for areas such as compute, big data, and container workloads.

Let’stake a lookat the differencesbetween a VM and a VMSS.

KeyDifferencesbetween Virtual Machinesand Virtual Machine Scale Sets

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 the VM. These processes are manual for normal virtual machines, which don’t require VMs to be identical.

Scaling

We need to manually monitor and use Azure automation to scale VMs. For VMSS’, we need to auto-scale is based on host metrics, in-guest metrics, application insights, and schedule.

WhyVMSS?

AzureVMSSprovidesthe management capabilities for applications that run across many VMs, automatic scaling of resources, and load balancing of traffic. Scale sets provide the following key benefits:

  • Easy to create and manage multipleVMs
  • Provides high availability and applicationresiliency
  • Allows your application to automatically scale as resource demandchanges
  • Works at large-scale

Easy toCreate and Manage MultipleVMs

When you have many VMs that run your application, it’s important to maintain a consistent configuration across your environment. For the reliable performance of your application, the VM size, disk configuration, and application installs should match across all VMs.

With scale sets, all VM instances are created from the same base OS image and configuration. This approach lets you easily manage hundreds of VMs without additional configuration tasks or network management.

Scale sets support the use of the Azure load balancer for basic layer-4 traffic distribution and Azure Application Gatewayfor more advanced layer-7 traffic distribution and TLS termination.

ProvidesHighAvailability andApplicationResiliency

Scale sets are used to run multiple instances of your application. If one of these VM instances has a problem, customers continue to access your application through one of the other VM instances with minimal interruption.

You can useAvailability Zones to automatically distribute VM instances in a scale set within a single datacenter or across multiple data centers for additional availability.

AllowsYourApplication toAutomaticallyScale asResourceDemandChanges

Customer demand for your application may change throughout the day or week. To match customer demand, scale sets can automatically increase VM instances as application demand increases, then reduce the number of VM instances as demand decreases.

Autoscale also minimizes the number of unnecessary VM instances that run your application when demand is low. At the same time, customers continue to receive an acceptable level of performance as demand grows and additional VM instances are automatically added. This ability helps reduce costs and efficiently create Azure resources as required.

Worksat a Large-Scale

Scale sets support up to 1,000 VM instances. If you create and upload your own custom VM images, the limit is 600 VM instances.For the best performance with production workloads, useAzure Managed Disks.

Let’s cover a use case regarding how deployed web application on Azure can take advantage of the scale set:

Understanding the Benefits of the Azure Virtual Machine Scale Set (VMSS) (1)

The diagram above shows all search servers need to handle the requests from end-users, meaning these servers have the same characteristics in terms of setup, computing specifications, CPU, memory.

Using VM scale sets, users can spin multiple VMs and not worry about managing each VM separately.

Considering that the traffic hitting the scale set is load-balanced across all the scale set members, higher availability and higher fault tolerance will allow the application to perform better.

Orchestration Modes for VMSS in Azure

VMSS provides a logical grouping of platform-managed virtual machines. With scale sets, you create a virtual machine configuration model, automatically add or remove additional instances based on CPU or memory load, and automatically upgrade to the latest OS version. Traditionally, scale sets allow you to create virtual machines using a VM configuration model provided at the time of scale set creation. The scale set can only manage virtual machines that are implicitly created based on the configuration model.

Scale set orchestration modes allow you to have greater control over how virtual machine instances are managed by the scale set. The orchestration mode is defined when you create the scale set and cannot be changed or updated later. There are two types of orchestration modes in Azure:

  • Uniform orchestration
  • Flexible orchestration

Uniform Orchestration

With uniform orchestration, virtual machine scale sets use a virtual machine profile or template to scale up to desired capacity. While there is some ability to manage or customize individual virtual machine instances, uniform uses identical VM instances.

Individual uniform VM instances are exposed via the virtual machine scale set VM API commands. Individual instances are not compatible with the standard Azure IaaS VM API commands, Azure management features such as Azure Resource Manager, which tags a resource with RBAC permissions, Azure Backup, or Azure Site Recovery. Uniform provides fault domain high availability guarantees when configured with fewer than 100 instances. It’s also generally available and supports a full range of scale set management and orchestration, including metrics-based autoscaling, instance protection, and automatic OS upgrades.

Flexible Orchestration

Azure provides a unified experience across the Azure VM ecosystem. Flexible orchestration offers high availability guarantees (up to 1000 VMs) by spreading VMs across fault domains in a region or within an Availability Zone. This enables you to scale out your application while maintaining fault domain isolation that is essential to run quorum-based or stateful workloads, including:

  • Quorum-based workloads.
  • Open-Source databases.
  • Stateful applications.
  • Services that require High Availability and large scale.
  • Services that want to mix virtual machine types or leverage Spot and on-demand VMs together.
  • Existing Availability Set applications.

Deploying VMSS Using ARM Template

What’s an ARM template, you ask? To provide some background, Azure is managed using an API. Still, it was originally managed using the Azure Service Management API or ASM, which controls deployments of “Classic.” Still, the Azure Resource Manager or ARM API replaced this API. The resources that the ARM API manages are objects in Azure such as network cards, virtual machines, hosted databases.

Benefits of ARM API

ARM API allows you to deploy several resources together in a single unit and when the deployments are an idempotent script type in Azure. The user can declare the type of resource, what name to use, and which properties it should have. The ARM API will create a new object that matches those details or change an existing object with the same name and type to have the same properties.

A VMSS allows you to deploy and manage a set of auto-scaling virtual machines. You can scale the number of VMs in the scale set manually or define rules to autoscale based on resource usages like CPU, memory demand, or network traffic. An Azure load balancer then distributes traffic to the VM instances in the scale set.

An ARM template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. The template uses declarative syntax. In declarative syntax, you describe your intended deployment without writing the sequence of programming commands to create the deployment.

ARM templates let you deploy groups of related resources. In a single template, you can create the VMSS, install applications, and configure autoscale rules. With the use of variables and parameters, this template can be reused to update existing or create additional scale sets. You can deploy templates through the Azure portal, Azure CLI, Azure PowerShell, or continuous integration/continuous delivery (CI/CD) pipelines.

In the diagram below, we can see how the Azure ARM template is used to deploy VMSS.

Let’s see what deploying a VMSS needs from the Azure portal:

From the Azure Portal, select the “Virtual Machine scale set” service:

Fill in the name of the VMSS along with the name of the administrator account on the VMs:

Specify the “DNS label” assigned to the public IP.

Specify the number of instances in the scale set. Scaling can be set to “manual” or “custom.”

Finally, check your configuration and create the VMSS:

Understanding the Benefits of the Azure Virtual Machine Scale Set (VMSS) (2)

Azure Knowledge in Minutes

Now you know about Azure VMSS and the differences between a virtual machine and VMSS. The VMSS instances can automatically increase or decrease in response to demand or a defined schedule and provide high availability to your applications, and allow you to centrally manage, configure, and update a large number of VMs. This is something only a cloud platform can provide with ease. For more information on Azure services, contact our experts today.

Understanding the Benefits of the Azure Virtual Machine Scale Set (VMSS) (2024)
Top Articles
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 6271

Rating: 4.3 / 5 (44 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.