Skip to main content

Availability Set

An Availability Set is a grouping of VMs in one datacenter that spreads them across fault domains and update domains. It keeps a single rack failure or host maintenance cycle from taking down every instance at once.

Availability Set

An Availability Set protects VMs against hardware failure and planned maintenance inside a single datacenter. Azure places the VMs across separate fault domains (racks with their own power and network) and update domains (batches that are patched one at a time). Placing two or more VMs in a set is what qualifies the workload for the 99.95% VM SLA.

How Do Fault Domains and Update Domains Work Together?

Fault domains cover unplanned hardware failures and update domains cover planned maintenance. Both are assigned automatically as you add VMs to the set.

flowchart TD AS["Availability Set
payments-avset"]:::tool AS -->|rack 0| F0["Fault domain 0
VM 1, VM 4"]:::cloud AS -->|rack 1| F1["Fault domain 1
VM 2, VM 5"]:::cloud AS -->|rack 2| F2["Fault domain 2
VM 3"]:::cloud classDef tool fill:#326CE5,color:#FFFFFF classDef cloud fill:#D1FAE5,color:#1E293B

How Do You Create an Availability Set?

Bash
az vm availability-set create --name payments-avset \
--resource-group mumbai-prod-rg --location centralindia \
--platform-fault-domain-count 3 --platform-update-domain-count 5
az vm create --name pay-vm-01 --resource-group mumbai-prod-rg \
--availability-set payments-avset --image Ubuntu2204 \
--size Standard_D4s_v5 --admin-username rahul

Why It Matters in Production

A payment-gateway tier at a company like Razorpay needs at least two VMs behind a load balancer, and the Availability Set guarantees those VMs never share a rack or reboot together during host patching.

Common Mistake

Assuming an Availability Set survives a datacenter or zone outage. All VMs live in the same datacenter, so use Availability Zones for that level of resilience. A VM also cannot be in an Availability Set and an Availability Zone at the same time.

Remember

Plan set membership up front. Tooling now allows moving a VM into a set after creation, but it requires stopping the VM, so it is not a casual change.

Frequently Asked Questions

Should I still use Availability Sets for new deployments?

Prefer Availability Zones where the region supports them, since zones give a higher SLA and isolate whole datacenters. Availability Sets remain useful in regions without zones or for workloads that must stay in one datacenter.

How many fault domains and update domains does a set have?

Fault domains default to 3 in most regions (2 in a few) and update domains default to 5, configurable up to 20. VMs are spread round-robin as you add them.

Does an Availability Set cost extra?

No. You pay only for the VMs, and the set itself is free.

Found a mistake, an outdated step or a broken link?