Virtual machine scale sets

ExplainedVirtual machinesAzure Portal, Hands OnBy Cloud Hands On

Many identical VMs, created, spread and resized for you.

A virtual machine scale set creates and manages a group of VMs from one definition: the same image, size and settings. You choose how many you want, or let autoscale add and remove them as demand changes.

Scale sets can spread VMs across availability zones and work with a load balancer, so one failure doesn't take the service down. Updates can be rolled out to the VMs a few at a time.

Cost. The scale set itself is free: you pay for every VM in it, every hour. Autoscaling can add VMs (and cost) quickly, so it's explained here rather than practised.

Use it when

How it works

Orchestration mode
Flexible (the default now) lets the set hold different sizes and works like ordinary VMs. Uniform keeps every VM identical.
Instance count
How many VMs to run. Change it by hand, on a schedule, or with autoscale rules.
Autoscale rules
Such as "add 2 VMs when average CPU is over 70% for 10 minutes", always with a minimum and a maximum.
Upgrade policy
How changes reach existing VMs: manually, automatically, or rolling a few at a time.

Options

Flexible
Recommended for new sets: mix sizes, spread across zones, manage like normal VMs.
Uniform
All VMs identical, managed as one unit. Older, but still used for big identical fleets.

Example. SS Kaiser's image-processing service runs on a scale set of 2 to 10 VMs. On sale days it grows to 10 within half an hour and shrinks back to 2 overnight.

Don't confuse it with

Availability set
Spreads VMs you create yourself. A scale set creates and resizes them for you.
App Service scale out
Scales a web app's servers without you managing VMs at all.
AKS node pools
Kubernetes nodes are themselves a scale set, managed by AKS.

Words to know

Instance
One VM in a scale set.
Scale out / in
Add or remove instances.
Autoscale
Rules that change the instance count automatically.

Where to look

  1. Home
  2. Virtual machine scale sets
  3. + Create

Practise it

Read it in the guide, next to the tasks and labs.

Open in Azure Portal, Hands On

Keep going