Domain 3 β€” Module 4 of 7 57%
15 of 27 overall
Domain 3: Deploy and Manage Azure Compute Resources Free ⏱ ~13 min read

Availability Sets, Zones & Scale Sets

Keep your VMs running when hardware fails, datacenters go down, or traffic spikes. Learn availability sets, availability zones, and Virtual Machine Scale Sets β€” Azure's three pillars of VM resilience.

Why availability matters

Simple explanation

Availability is about keeping your app running even when things break.

On-prem, you’d have two servers in a failover cluster. If one dies, the other takes over. Azure gives you three ways to do this: Availability Sets spread VMs across fault domains within a datacenter. Availability Zones spread VMs across separate datacenters in a region. Scale Sets automatically create and remove VMs based on demand.

Availability Sets

An availability set distributes VMs across fault domains and update domains within a single datacenter.

  • Fault domain (FD) β€” a group of VMs sharing common power and network. Max 3 FDs per set. If a rack loses power, only VMs in that FD are affected.
  • Update domain (UD) β€” a group of VMs that can be rebooted simultaneously during maintenance. Max 20 UDs. Azure reboots one UD at a time.

SLA: 99.95% for 2+ VMs in an availability set.

Availability Zones

Availability zones are physically separate datacenters within an Azure region. Each zone has independent power, cooling, and networking.

  • Most regions have 3 zones (Zone 1, 2, 3)
  • Deploy VMs across zones for datacenter-level protection
  • SLA: 99.99% for VMs across 2+ zones (higher than availability sets)
Availability Sets vs Availability Zones
FeatureAvailability SetsAvailability Zones
Protection scopeHardware rack failure within a datacenterEntire datacenter failure within a region
Physical separationDifferent racks (fault domains)Different buildings (datacenters)
SLA99.95%99.99%
CostNo extra cost (just VM cost)No extra cost (but cross-zone bandwidth charges)
ConfigurationAssign VMs to the same availability setDeploy VMs to different zones in the same region
Works withVMs in the same datacenterVMs in the same region, different datacenters
Exam tip: Know the SLA numbers

This is heavily tested:

  • Single VM with Premium SSD: 99.9% SLA
  • Availability Set (2+ VMs): 99.95% SLA
  • Availability Zones (2+ VMs across zones): 99.99% SLA

If a question asks for the highest availability, the answer is Availability Zones. If the question asks for protection against rack failure only, Availability Sets are sufficient.

Virtual Machine Scale Sets (VMSS)

VMSS lets you create and manage a group of identical, load-balanced VMs that automatically scale based on demand.

Key features:

  • Auto-scale β€” add VMs when demand increases, remove when it decreases
  • Load balancing β€” built-in integration with Azure Load Balancer or Application Gateway
  • Rolling updates β€” update VMs in batches without downtime
  • Support for Availability Zones β€” distribute instances across zones

Scaling options:

TypeHow It Works
Manual scalingSet fixed instance count (e.g., always 5 VMs)
Auto-scale (metric)Scale based on CPU%, memory, or custom metrics
Auto-scale (schedule)Scale at specific times (e.g., more VMs during business hours)
Real-world: CloudFirst Labs auto-scales

CloudFirst Labs runs their web app on a VMSS with these rules:

  • Minimum 2 instances (always running)
  • Maximum 10 instances (cost cap)
  • Scale out: add 1 instance when average CPU exceeds 70% for 5 minutes
  • Scale in: remove 1 instance when average CPU drops below 30% for 10 minutes
  • Schedule: minimum 4 instances Monday-Friday 8am-6pm (business hours)

During a product launch, the VMSS automatically scaled to 8 instances, then back to 2 overnight. Zero manual intervention.

Question

What is the difference between a fault domain and an update domain?

Click or press Enter to reveal answer

Answer

A fault domain is a group of VMs sharing common power and network (same rack). A update domain is a group of VMs that can be rebooted together during planned maintenance. Availability sets spread VMs across both to minimise impact from hardware failure (FD) and maintenance (UD).

Click to flip back

Question

What SLA does Azure provide for VMs deployed across availability zones?

Click or press Enter to reveal answer

Answer

99.99% uptime SLA for two or more VMs deployed across two or more Availability Zones in the same region. This is the highest VM SLA available, higher than Availability Sets (99.95%) or single VMs with Premium SSD (99.9%).

Click to flip back

Question

What is a Virtual Machine Scale Set?

Click or press Enter to reveal answer

Answer

A VMSS is a group of identical, load-balanced VMs that can automatically scale based on demand or schedule. All VMs use the same image and configuration. VMSS integrates with Azure Load Balancer and supports rolling updates, auto-scale rules, and deployment across Availability Zones.

Click to flip back

Knowledge check

Knowledge Check

Meridian Financial needs their production database VMs to survive a complete datacenter failure within their Azure region. What should Alex configure?

Knowledge Check

CloudFirst Labs wants their web tier to automatically add VMs when traffic spikes and remove them when traffic drops. What Azure resource should they use?