Thursday, 4 June 2015

Ensuring high availability in Windows Azure with Availability Groups

It might come as a shock to many (or maybe not) that by default virtual machines on the Azure Cloud offer no high availability whatsoever. Although microsoft does offer a 99.95% availability option if you utilize availability sets - however competitors such as AWS offer this as standard.

Availability sets require at least two or more virtual machines to function - for example you could have two web servers and two backend SQL servers running both running in an availability set.

An availability set provides a guaranteed availability ensuring that the VM's are spread accross different  racks in the Azure datacentre - hence offering switch and power supply redudency. They are also vital when Microsoft are performing planned maintainence due to the fact that sometimes the VM's need to be restarted as a result.

We can set an availability set up in one of two ways - either defining the availability set upon creation of the VM's:

$vm1 = New-AzureVMConfig -Name "myvm1" -InstanceSize Small -ImageName $img -AvailabilitySetName "myavset"

or simply assigning the availability set with a pre-provisioned VM (although note that a VM restart will be needed for changes to take effect):
Get-AzureVM -ServiceName "mycloudsvcname" -Name "myvm1" | Set-AzureAvailabilitySet -AvailabilitySetName "myavset" | Update-AzureVM

In the scenerio of a web application as above - you would also obviously require the use of a load balancer for the web servers.

Pricing / Costs

As far as I can tell there are not any charges explicitly for using an availability group - although he fact that both of the VM's must be running in the group double your costs anyway.


Post a Comment