0Pricing
Cloud & IT Cert Prep · Lesson

Availability Sets and Availability Zones

Deploy VMs into an availability set or across availability zones, and understand the fault and update domain model that prevents simultaneous failures.

Availability Sets and Availability Zones is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Redundancy Matters for VMs

A single Azure Virtual Machine is vulnerable to hardware failures, OS updates, and planned maintenance events. Azure provides two mechanisms to protect VM workloads from these disruptions: Availability Sets and Availability Zones. Understanding the difference between them — and when to use each — is essential for designing reliable Azure VM architectures.

What Is an Availability Set?

An Availability Set is a logical grouping of VMs within a single Azure data centre. When you place VMs in an availability set, Azure distributes them across multiple fault domains (separate power and network racks) and update domains (groups that are rebooted one at a time during maintenance). This protects against both hardware failures and planned reboots.

# Create an availability set:
az vm availability-set create \
  --resource-group myRG \
  --name myAvailabilitySet \
  --platform-fault-domain-count 2 \
  --platform-update-domain-count 5

Fault Domains and Update Domains

Fault domains represent groups of VMs that share the same physical hardware (power supply and network switch). Azure separates VMs across up to 3 fault domains to ensure a power or rack failure does not take down all VMs at once. Update domains represent groups of VMs rebooted together during Azure platform maintenance. Azure supports up to 20 update domains, and only one domain is rebooted at a time.

# Example: 4 VMs in an availability set with 2 fault domains and 5 update domains:
# VM1: Fault Domain 0, Update Domain 0
# VM2: Fault Domain 1, Update Domain 1
# VM3: Fault Domain 0, Update Domain 2
# VM4: Fault Domain 1, Update Domain 3
# At most 2 VMs can be affected by a single fault or update event

Availability Set SLA

Placing two or more VMs in an availability set qualifies for a 99.95% SLA from Microsoft. This is a significant improvement over the 99.9% SLA for a single VM. Availability sets are free — you only pay for the VMs themselves. They are suitable for workloads that can tolerate the VMs being in the same data centre, as they do not protect against a full data centre outage.

What Are Availability Zones?

Availability Zones are physically separate data centres within the same Azure region. Each zone has independent power, cooling, and networking. Azure regions that support availability zones have at least three zones. By deploying VMs across availability zones, you protect against an entire data centre failure — a much stronger guarantee than availability sets provide.

# Deploy a VM to availability zone 1:
az vm create \
  --resource-group myRG \
  --name webVM1 \
  --image Ubuntu2204LTS \
  --zone 1

# Deploy a second VM to availability zone 2:
az vm create \
  --resource-group myRG \
  --name webVM2 \
  --image Ubuntu2204LTS \
  --zone 2

Availability Zone SLA

Deploying two or more VMs across different availability zones qualifies for a 99.99% SLA — the highest available for Azure VMs. This is because even if an entire zone fails (data centre outage, power grid failure, etc.), VMs in the other zones continue running. The trade-off is that inter-zone data transfer incurs a small cost, and the zones are still within the same region.

Availability Sets vs. Availability Zones

Choose between the two options based on your requirements:

  • Availability Set — same data centre, protects against hardware failure and planned maintenance, 99.95% SLA. Use when zones are not available in your region or for legacy lift-and-shift migrations.
  • Availability Zone — different data centres in the same region, protects against data centre failure, 99.99% SLA. Use for all new production workloads where zones are supported.

Zone-Redundant Services

Many Azure PaaS services support zone-redundant deployment without requiring you to manually spread resources across zones. Examples include Azure SQL Database Business Critical tier, Azure Cache for Redis Premium, Azure Kubernetes Service, and Azure Load Balancer Standard. When zone redundancy is enabled, the service automatically distributes replicas across zones.

# Create a zone-redundant Azure SQL Database:
az sql db create \
  --resource-group myRG \
  --server mySqlServer \
  --name myDatabase \
  --service-objective 'BusinessCritical' \
  --zone-redundant true

Load Balancing Across Zones

When VMs are spread across availability zones, you need a load balancer that can direct traffic to VMs in any zone. Use Azure Load Balancer Standard (zone-redundant by default) or Azure Application Gateway v2 to distribute traffic across zonal VMs. These services support health probes that automatically stop sending traffic to VMs that become unresponsive.

# Create a Standard Load Balancer (zone-redundant):
az network lb create \
  --resource-group myRG \
  --name myLoadBalancer \
  --sku Standard \
  --public-ip-address myPublicIP

Checking Region Zone Support

Not all Azure regions support availability zones — only regions designated as recommended regions are guaranteed to have at least three zones. Use the Azure CLI or portal to check zone availability in your target region before designing an architecture that depends on zones. If zones are not available, availability sets are the fallback option.

# Check which zones are available in a region:
az vm list-skus \
  --location eastus \
  --size Standard_D2s_v3 \
  --output table

# The output shows which availability zones support the chosen VM size

Cost Implications of Zones

Availability zones themselves are free to use — you pay only for the resources deployed in them. However, data transfer between zones within the same region is charged at a per-GB rate. For most applications this cost is minimal, but high-bandwidth workloads (e.g., video processing) should account for inter-zone transfer costs in their architecture design.

Quick Check

Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.

Lesson Recap

In this lesson you learned: availability sets protect VMs within a single data centre via fault and update domains (99.95% SLA); availability zones spread VMs across separate data centres in a region (99.99% SLA); and zone-redundant PaaS services handle this distribution automatically. Next up we explore multi-region active-active architecture for even higher availability.

Frequently asked questions

Is the “Availability Sets and Availability Zones” lesson free?

Yes — the full text of “Availability Sets and Availability Zones” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Availability Sets and Availability Zones”?

Deploy VMs into an availability set or across availability zones, and understand the fault and update domain model that prevents simultaneous failures. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Availability Sets and Availability Zones” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Azure SLAs and Composite SLAs
  2. Availability Sets and Availability Zones
  3. Multi-Region Active-Active Architecture
  4. Health Probes and Graceful Degradation
← Back to Cloud & IT Cert Prep