You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
When running production workloads on Azure VMs, you need to protect against failures. Azure provides two primary mechanisms for ensuring virtual machine availability: Availability Sets and Availability Zones. Understanding the difference between them — and when to use each — is essential for designing resilient architectures.
Before discussing availability features, it's important to understand what can go wrong:
| Failure Type | Description | Example |
|---|---|---|
| Hardware failure | A physical component fails | Server power supply fails, memory error |
| Rack failure | An entire rack loses power or connectivity | Top-of-rack switch failure, rack PDU failure |
| Data centre failure | An entire facility is impacted | Power outage, cooling failure, natural disaster |
| Planned maintenance | Azure updates host OS or firmware | Monthly security patches, hardware upgrades |
Azure's availability features are designed to mitigate these scenarios.
An Availability Set distributes VMs across multiple fault domains and update domains within a single data centre.
A fault domain represents a group of VMs that share a common power source and network switch — essentially a physical rack. If a rack fails, only VMs in that fault domain are affected.
An update domain represents a group of VMs that can be rebooted at the same time during planned maintenance. Azure updates one update domain at a time, ensuring that not all your VMs are rebooted simultaneously.
Availability Set (3 FDs, 5 UDs)
┌─────────────────────────────────────────────────┐
│ FD 0 FD 1 FD 2 │
│ ┌─────┐ ┌─────┐ ┌─────┐ │
│ │ VM1 │ │ VM2 │ │ VM3 │ ← UD 0,1,2 │
│ │ VM4 │ │ VM5 │ │ VM6 │ ← UD 3,4,0 │
│ └─────┘ └─────┘ └─────┘ │
│ (Rack A) (Rack B) (Rack C) │
└─────────────────────────────────────────────────┘
az vm availability-set create \
--resource-group rg-ha-demo \
--name myAvailabilitySet \
--platform-fault-domain-count 3 \
--platform-update-domain-count 5
Deploying 2 or more VMs in an Availability Set provides a 99.95% SLA for compute.
Availability Zones are physically separate locations within an Azure region. Each zone has independent power, cooling, and networking. They provide protection against data centre-level failures.
Most Azure regions that support Availability Zones have three zones:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.