Architect Zone-Redundant Compute Deployments
Fault Isolation with Zones and Sets
Designing high availability for Azure compute requires choosing the right level of physical and logical isolation. Availability Zones are physically separate datacenters within a single region, each containing independent power, cooling, and networking systems. In contrast, Availability Sets isolate virtual machines (VMs) logically within a single datacenter by spreading them across different hardware racks, known as fault domains and update domains. Designing workloads with Availability Zones protects applications against entire datacenter outages, whereas Availability Sets only guard against local hardware or power supply failures on a specific rack.
Scaling with Virtual Machine Scale Sets
To manage large groups of identical VMs automatically, architects use Virtual Machine Scale Sets configured in flexible orchestration mode. This mode allows Azure to automatically distribute scale set instances and their underlying disks across multiple Availability Zones to ensure high availability. When setting up these scale sets, you must configure key settings to control how instances are balanced and protected:
- Zone balance: Choose best-effort zone balance to prioritize quick VM creation even if zones become uneven, or strict zone balance to force an equal number of VMs in each zone.
- Fault domain spreading: Use max spreading to spread VMs across as many physical racks as possible, or align the VMs with the fault domains of their managed disks.
- Health probes: Integrate the scale set with Azure Load Balancer to monitor VM health and automatically remove unhealthy instances from the network rotation.
Deploying Redundant Individual Virtual Machines
When an application cannot use scale sets, you can still achieve high availability by distributing individual VMs across three Availability Zones. To ensure the application remains resilient, you must deploy at least two VMs per zone and direct incoming traffic to them using an Azure Load Balancer. The operating system and data disks for these VMs must be zone-redundant to prevent data loss. Using zone-redundant storage (ZRS) disks prevents data loss during a zone failure because Azure automatically replicates the disk data across multiple zones.
Safe Upgrades and Autoscaling Policies
Maintaining application uptime during updates requires careful coordination between the network load balancer and compute instances. Before deploying updates, check the Azure Service Health Dashboard to confirm there are no ongoing platform issues or planned maintenance events. Next, configure the load balancer health probes to drain traffic away from the specific zone undergoing maintenance, ensuring no users experience dropped connections. Perform rolling upgrades one zone at a time to keep the overall application capacity stable during the process.
To handle unexpected traffic spikes, define autoscaling policies that automatically add or remove VM instances based on metric thresholds, such as average CPU usage exceeding eighty percent. These policies monitor performance in real-time to adjust capacity up or down across all configured zones. The load balancer and its health probes work together with these scaling rules to ensure that newly created VMs only receive traffic after they are fully running and have passed their initial health checks.