| Affinity-groups | Multi-Region Architecture with VNets | |
Availability Sets in Azure |
An Availability Set in Azure is a logical grouping of two or more Virtual Machines (VMs) that ensures your application remains available during planned or unplanned maintenance events. It improves fault tolerance and high availability by distributing VMs across multiple Fault Domains and Update Domains.
The following diagram shows 2 Fault Domains and 2 Update Domains with 4 VMs spread across them:
| Feature | Benefit |
|---|---|
| Fault Isolation | Protects against rack-level failures |
| Update Resilience | Minimizes downtime during maintenance |
| SLA Guarantee | 99.95% uptime when 2+ VMs are used |
| Cost Neutral | No extra charge for using Availability Sets |
Purpose: Ensures VMs are distributed across multiple fault and update domains, minimizing downtime during hardware failures or planned maintenance.
You deploy two web servers in an availability set. If one rack fails or gets updated, the other stays online. This setup qualifies for Azureβs 99.95% SLA for VM uptime.
Best for:
Purpose: Groups resources physically close together in the same Azure datacenter region for lower latency and better performance.
You deploy a VM and a storage account in the same affinity group to reduce latency for disk I/O.
Best for:
| Feature | Availability Set | Affinity Group |
|---|---|---|
| Goal | High availability | Low latency via co-location |
| Fault tolerance | β Yes (FD/UD separation) | β No fault isolation |
| SLA eligibility | β 99.95% for VMs | β Not tied to SLA |
| Resource placement | Spread across racks | Grouped in same cluster |
| Modern usage | β Recommended | β οΈ Deprecated (use regional VNets) |
| Configuration timing | Can be added post-deployment | Must be set at resource creation |
| Affinity-groups | Multi-Region Architecture with VNets | |