CAMPUX Cloud Bootcamp
Field notes · Compute
Scale sets

Virtual Machine Scale Sets: one template, many identical VMs, scaling itself

By Victor Thomson16 July 20267 min read

Running one VM is easy. Running forty identical ones, keeping their config in lockstep, adding more when traffic spikes and removing them when it dies down at 3am — that is a job you do not want to do by hand. A scale set is Azure doing it for you from a single template.

An Azure Virtual Machine Scale Set is, in Microsoft's words, a way to "create and manage a group of load balanced virtual machine (VM) instances," where "the number of VM instances can automatically increase or decrease in response to demand or a defined schedule." Two ideas are packed into that sentence, and both matter: the VMs are identical and managed as a group, and the group resizes itself. Together they turn a fleet of servers from a manual chore into a managed resource.

Identical by construction

The first superpower is uniformity. Every instance in a scale set is created from the same base OS image and configuration — same VM size, same disk setup, same installed software. That consistency is not cosmetic; it is what makes the fleet reliable. When all forty VMs are provably identical, a load balancer can send a request to any of them and get the same behavior, and you can reason about the whole group as one thing instead of forty snowflakes. Need to change something? You update the model, and the scale set rolls it across instances — no logging into each box. Configuration drift, the slow curse of hand-managed fleets, mostly disappears.

Scaling that follows demand

The second superpower is elasticity, and it is the reason scale sets exist. Customer load rises and falls across a day and a week; a scale set can autoscale to match it — adding instances as demand climbs to hold performance steady, then removing them when it drops so you are not paying for idle machines at midnight. You can drive that from metrics (CPU, memory, queue depth) or from a schedule (scale up before the Monday morning rush). This is elasticity in its purest form, and it is exactly the "only pay for what you're using" promise that made the cloud worth moving to. It pairs directly with the ideas in autoscaling on Azure — a scale set is the thing autoscale rules actually resize.

One image defines the fleet; demand defines its size. You stop managing servers and start managing a rule.

Built for high availability

Because a scale set runs many instances of your app, a single sick VM is a shrug, not an outage — traffic keeps flowing to the healthy ones. You can go further and have the scale set spread its instances across availability zones or fault domains, so the failure of one datacenter does not take the whole fleet with it. (One honest caveat straight from the docs: a scale set on its own does not protect against a datacenter failure — you get that resilience by choosing to distribute instances across zones.) Spread across zones, behind a load balancer, a scale set is a genuinely resilient way to run a stateless tier.

Two orchestration modes — pick at creation, it's permanent

Scale sets come in two orchestration modes. Uniform is the classic mode optimized for large numbers of identical instances managed through a single VM model — great for stateless web tiers. Flexible is the newer, more general mode: it gives high-availability guarantees by spreading VMs across fault domains and lets you mix VM types, or combine Spot and on-demand instances, for workloads like quorum-based systems, open-source databases, and stateful apps. One thing to burn into memory: the orchestration mode is set when you create the scale set and cannot be changed later. Choose deliberately.

Where you have already met scale sets without knowing

Scale sets are a foundational building block, so they show up underneath higher-level services. The node pools in Azure Kubernetes Service are backed by scale sets — when AKS adds a node to handle more pods, a scale set instance is what appears. Any time you have seen "the cluster grew a node," a scale set did the growing. Understanding scale sets, in other words, is understanding the machinery under a lot of Azure's elastic compute.

The takeaway

A Virtual Machine Scale Set manages a fleet of identical VMs built from one image, and grows or shrinks that fleet automatically to match demand or a schedule. Uniformity kills configuration drift, autoscale kills the "paying for idle capacity" waste, and spreading instances across zones behind a load balancer gives you real high availability. Pick Uniform for large stateless fleets and Flexible for mixed or stateful ones — and remember the mode is permanent. "A scale set behind a load balancer, autoscaling on CPU and spread across three zones" is the answer of someone who runs a resilient tier without hand-managing a single VM.

Further reading — the Microsoft docs
Drilled in Class 11 — Compute. Back to all field notes →