Compute high availability
Applications demanding high availability should be deployed on multiple VMs on the same availability set. If applications are composed of multiple tiers, then each tier should have a group of VMs on their dedicated availability set. In short, if there are three tiers of an application, there should be three availability sets and a minimum of six VMs (two in each availability set) to make the entire application highly available.
How does Azure provide an SLA and high availability to VMs in an availability set with multiple VMs in each availability set? This is the question that might be coming to mind.
Here, the use of concepts that we considered before comes into play—fault and update domains. When Azure sees multiple VMs in an availability set, it places those VMs on a separate fault domain. In other words, these VMs are placed on separate physical racks instead of the same rack. This ensures that at least one VM continues to be available even if there is a power, hardware, or rack failure. There are two or three fault domains in an availability set and, depending on the number of VMs in an availability set, the VMs are placed on separate fault domains or repeated in a round-robin fashion. This ensures that high availability is not impacted because of the failure of the rack.
Azure also places these VMs on a separate update domain. In other words, Azure tags these VMs internally in such a way that these VMs are patched and updated one after another, such that any reboot in an update domain does not affect the availability of the application. This ensures that high availability is not impacted because of the VM and host maintenance.
With the placement of VMs in separate fault and update domains, Azure ensures that not all of them are down at the same time and are alive and available for serving requests, even though they might be undergoing maintenance or facing physical downtime challenges:
The preceding diagram shows four VMs (two are IIS and two are SQL-related). Both IIS and SQL VMs are part of their availability set. The IIS and SQL VMs are on a separate fault domain and different racks in the data center. They would also be on separate upgrade domains.
The following diagram shows the relationship of fault and update domains.