Keeping an application running is the most important job for an IT professional. People depend on reliability and availability to do their work or consume your service. To achieve maximum uptime with your virtual machines, take a look at Azure availability sets!

In this tutorial, you’ll learn about Azure availability sets and the benefits of using availability sets with your virtual machines. You’ll also learn how to deploy availability sets using PowerShell, Azure CLI, and Terraform. So if you’re ready, let’s get down to it!

What is an Azure Availability Set?

Azure availability sets organize your virtual machines (VMs) into logical groupings. These groupings allow Azure to understand how you have built your application hosted on the virtual machines. Azure can then provide better virtual machine management, redundancy, and availability.

If you prefer to deploy a highly available application, Microsoft recommends placing two or more virtual machines into an availability set. By placing two more VMs in an availability set, you achieve Azure’s 99.95% uptime service-level agreement (SLA). Lucky for you, availability sets are free to use! You only pay for the virtual machines being created.

Saving VMs from Host Reboots with Update Domains

Azure virtual machines are no different than on-premises virtual machines in that virtual machines exist on a single physical host server. An update domain represents the physical host server and virtual machines that Azure can reboot simultaneously.

Think about an application hosted on three virtual machines. Those three virtual machines should not be hosted on the same host server. If that host server experienced a failure, all three virtual machines go offline, and the application is no longer available. An update domain solves this problem.

When you associate VMs with an availability set, Azure will automatically place VMs into separate update domains. As an availability set places VMs into separate domains, it prevents multiple virtual machines from going offline. Update domains also keep virtual machines up when Azure performs maintenance or the host experiences a failure.

During planned maintenance, Azure can reboot update domains in any order. However, Azure guarantees it will only reboot one update domain at a time. Azure gives a rebooted update domain 30 minutes to recover before moving to the next update domain during maintenance.

Availability sets can have up to 20 update domains. The diagram below illustrates how Azure places three virtual machines (VM1, VM2, and VM3) into three update domains across two server racks.

#cloud #microsoft azure

Getting Started: Setting up an Azure Availability Set
2.95 GEEK