Virtual machine scale sets
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
- an app runs on several identical VMs, such as web servers behind a load balancer.
- demand rises and falls through the day and you want to pay only for the VMs you need.
- you need hundreds of VMs for a batch job and want them created and removed together.
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
- Home
- Virtual machine scale sets
- + Create
Practise it
- Availability zones, availability sets and scale setsHow-to, Look only
- Scale up, scale out and autoscaleHow-to, Costs money
Read it in the guide, next to the tasks and labs.
Open in Azure Portal, Hands On