0PricingLogin
Azure Fundamentals · Lesson

Virtual Machine Scale Sets

Automatically scale identical VMs in or out based on demand, and configure health probes and load-balancing rules for high-availability applications.

The Problem Scale Sets Solve

Manually managing a fleet of identical VMs — adding servers during peak demand and removing them when demand drops — is tedious, error-prone, and slow. Virtual Machine Scale Sets (VMSS) automate this process by managing a group of identical, load-balanced VMs as a single resource. When demand increases, VMSS automatically adds new VM instances. When demand decreases, it removes instances. This eliminates the need for manual intervention and ensures you pay only for the capacity you need at any moment.

Creating a Scale Set

A scale set is defined by a VM profile (image, size, disk configuration, extensions) that every instance in the set shares. When you create a scale set, you specify the minimum and maximum instance counts and the initial capacity. All instances are created from the same image, ensuring consistency across the fleet. You can deploy a scale set across multiple availability zones, and Azure automatically distributes instances evenly across zones for high availability.

# Create a VM Scale Set across Zones 1, 2, and 3
az vmss create \
  --resource-group myRG \
  --name myScaleSet \
  --image Ubuntu2204 \
  --instance-count 2 \
  --zones 1 2 3 \
  --admin-username azureuser \
  --generate-ssh-keys

All lessons in this course

  1. Azure Virtual Machines
  2. Virtual Machine Scale Sets
  3. Azure Virtual Desktop
  4. Choosing the Right Compute Service
← Back to Azure Fundamentals