SQL Server 2012 / 2014 Always-on in Microsoft Windows Azure

We have heard enough of the new feature in SQL Server 2012 that replaces our conventional Database Mirroring notion. It is the Always-on Availability groups feature. I have carried out several tests setting up Always-on on my virtual data-center in my laptop. One fine day at office, I was assigned a project to build an Always-on availability group in Microsoft Azure.

Let’s first go through the prerequisites.

  1. Availability group replicas must reside in a single Cloud service.
  2. Availability group Listener IP should be same as the public Cloud service IP assigned to each replica.
  3. Two endpoints has to be created for the Cloud Service in Azure dashboard. One for the probe port(Through which the Azure Load Balancing services monitors the health of each virtual machine) and one for Always-on Listener port. Probe port should be different from the Listener port. For eg. Give 59999 for Probe port and 1433 for the always-on listener port.
  4. Install the hotfix 2854082 to enable SQL Server Availability Group Listeners on Windows Server 2008 R2 and Windows Server 2012-based Microsoft Azure virtual machines.

Limitations in Azure:

  1. Each virtual machine in Azure could have only one Ethernet card and one private IP. This limitation stops us from using a private IP for Always-on availability group. Even if we give a private IP for the listener, the IP will not ping or connect over the network.
  2. The client application must reside on a different cloud service than the one that contains your availability group VMs. Azure does not support direct server return with client and server in the same cloud service.
  3. Only one availability group listener is supported per cloud service because the listener is configured to use the cloud service IP address.
  4. If you are creating a listener for a hybrid environment, the on-premises network must have connectivity to the public Internet in addition to the site-to-site VPN with the Azure virtual network. When in the Azure subnet, the availability group listener is reachable only by the public IP address of the respective cloud service. Ref: http://msdn.microsoft.com/en-us/library/dn425027.aspx

I went ahead and started working on it. I asked for 4 virtual servers.
Continue reading “SQL Server 2012 / 2014 Always-on in Microsoft Windows Azure”