Availability Sets Overview
Availability sets are logical groupings of virtual machines (VMs) that help reduce the chances of correlated failures. By distributing VMs across different fault domains, availability sets enhance reliability and are especially useful in Azure regions that do not support availability zones. Placing at least two VMs in an availability set can achieve a 99.95% Azure SLA without additional costs, making this a cost-effective way to meet uptime requirements.
Fault Domains and Update Domains
Within an availability set, Azure separates VMs across different domains to protect against different types of failures. Fault domains group VMs that share common power sources and network switches, and Azure can separate VMs across up to 3 fault domains to limit the impact of physical hardware failures like a power outage or switch failure. Update domains contain VMs and physical hardware that can be restarted together during planned maintenance, and Azure services one update domain at a time so that some VMs stay running while others are updated. This two-domain approach ensures that maintenance or hardware failures do not take all your VMs offline at once.
Availability Zones
Availability zones provide a higher level of reliability by allowing VMs to be deployed across multiple datacenters within the same Azure region. Each zone operates independently with its own power, cooling, and networking, protecting your VMs from localized datacenter failures like a building-wide power outage or network outage. Because the zones are geographically separated within the region, this setup offers stronger resilience compared to availability sets, though it requires support from the specific Azure region you are using.
VM Allocation and Setup
When deploying VMs, you must choose whether to place them in an availability set or across availability zones based on your resiliency needs. For availability sets, you configure the number of fault domains and update domains using Azure CLI or PowerShell to define how Azure spreads your VMs across physical hardware. For availability zone deployments, you specify which zone each VM belongs to, and Azure automatically distributes them across separate datacenters. The choice between these options depends on your SLA requirements, your budget, and whether the Azure region supports availability zones. Understanding how both options work helps you configure VMs to meet the specific uptime and business continuity goals your applications require.