In the Azure world, very often people confuse themselves between availability set and availability zone. Off-course both the technologies are designed to keep the application highly available from a single point of failure from various components or the complete zone itself. But both options are mutually exclusive. In other words, if you choose the availability zone, you can’t use the availability set for the VM.
Both the methods are only useful if your application can be hosted on more than 2 or more virtual machines. To know more about the availability zone, please check out this article.
What is the availability set?
When you deploy the virtual machine in Azure, it can be spanned across multiple servers in the Azure back-end. But there could also be a chance where your VMs might place on the same physical server as well. Assume that you have an application that hosted on more than two VMs with a load balancer. By chance, if the VM’s are getting into the same physical rack or same physical server, it’s a single point of failure. To overcome this issue, Azure has an option called – Availability set.
An Availability Set is a logical grouping capability for isolating VM resources from each other when they’re deployed. Azure ensures that the VMs you place within an Availability Set run across multiple physical servers, compute racks, storage units, and network switches. Each rack gets its own power supply units as well. This increases service availability from 99.9% to 99.95% when you deploy more than one VM.
Availability Set uses two key methods to keep the VM’s in the different physical computing environments. When you add the virtual machines in the same availability set, it will automatically distribute the VMs to different Update domain and fault domains to eliminate the single point of failure within the datacenter.
There are three scenarios that can lead to a virtual machine in Azure being impacted:
- unplanned hardware maintenance.
- unexpected downtime.
- planned maintenance.
What is the fault domain?
Each underpinning physical resource will be tagged to a specific fault domain in the Azure back-end. Each fault domain might share the same rack, network, and power source. When you add more than one VM to the availability set, the Azure platform ensures that VM’s are spread across different fault domains.
Is it possible to keep all your VM’s in different fault domains? Yes | No. Azure offers a only maximum of 2 to 3 fault domains based on the region. If you have more than 3 application servers, you rotate among these three FD. The fault domain can protect your applications in the following scenarios.
- unplanned hardware maintenance.
- unexpected downtime.
What is the Update domain?
Like the fault domain, each physical server is tagged with specific update domains. Azure performs maintenance on only one specific update domain at the time. This could be updating the host machines with the latest patches or fixing the vulnerability.
You get the default fault domain as 5 and it can be increased up to 20.
- Virtual machines get update domains automatically once they are put inside the availability set.
- All virtual machines within that update domain will reboot together.
- Only one update domain would be updated at the time.
Scenario:
Question: If the solution requires 5 application VM’s to be deployed in Azure and geo-redundant DBaaS is used as DB, how to keep the application high available?
Answer: Place all the 5 VM’s in an availability set and ensure that VM’s are spread across fault domains and update domains just like below.
VM | Fault Domain (3 Fault domains) | Update Domain (5 Update domains) |
VM 1 | 0 | 0 |
VM 2 | 1 | 1 |
VM 3 | 2 | 2 |
VM 4 | 0 | 3 |
VM 5 | 1 | 4 |
Quick Summary:
Availability Sets
- An unplanned event wherein the underlying infrastructure fails unexpectedly. The failures could be attributed to network failures , local disk failures or even rack failures.
- Planned maintenance events , wherein Microsoft needs to make planned updates to the underlying physical environment. In such cases , a reboot might be required on your virtual machine.
You can increase the availability of your application by making use of availability sets. Each virtual machine that is assigned to the availability set is assigned a separate fault and update domain.
Fault domains are used to define the group of virtual machines that share a common source and network switch. You can have up to 3 fault domains.
Update domains are used to group virtual machines and physical hardware that can be rebooted at the same time. You can have up to 20 update domains.
Availability Zones
- This features help provides better availability for your application by protecting them from datacenter failures.
- Each Availability zone is a unique physical location in an Azure region.
- Each zone comprises of one or more data centers that has independent power, cooling, and networking
- Hence the physical separation of the Availability Zones helps protect applications against data center failures
- Using Availability Zones, you can be guaranteed an availability of 99.99% for your virtual machines. You need to ensure that you have 2 or more virtual machines running across multiple availability zones
Mohamed Shafi says
the information is very useful. thanks very much.. Mohamed Shafi – AbuDhabi