Configure VM Internal Load Balancing
Start course

High availability and disaster recovery are key to ensuring reliable business continuity. While SAP workloads are mainly confined to Azure's infrastructure layer, it is still possible to utilize many Azure functions and features to enhance system reliability with relatively little effort. This course looks at when, where, and how to use Azure's built-in infrastructure redundancy to improve system resiliency and how various database high availability options are supported.

Learning Objectives

  • Understand the key aspects of high availability and disaster recovery
  • Learn about availability and availability zones
  • Learn about Azure Site Recovery and how to implement it through the Azure portal
  • Learn how to set up an internal load balancer in the context of SAP workloads
  • Understand the Azure support options for Pacemaker and STONITH
  • Learn how to implement Data Guard mirroring via the Azure CLI
  • Set up Windows Failover Cluster and SQL Server Always On through the Azure portal

Intended Audience

This course is intended for anyone who wants to use Azure's built-in infrastructure redundancy to enhance the reliability and resiliancy of their SAP workloads.


To get the most out of this course, you should be familiar with Azure, Azure CLI, SAP, SQL Server, and STONITH.


Before implementing SAP HANA system replication between virtual machines, you must set up and configure your Azure Infrastructure. Broadly speaking, this involves deploying an internal load balancer between multiple VMs in an availability set. One option is to use a preconfigured Azure Resource Manager template available from the Azure marketplace. Here I have an SAP 3 tier marketplace image where all I have to do is fill in the blank parameters. So that's a resource group, which I'll create now. The OS will need to be changed to Linux, in this case, Suse Enterprise Server. Obviously, the database will be HANA, and system availability is high - ok, that's it.

No, seriously, let's go through setting up an internal load balancer through the portal. Firstly, let's create a virtual network called hana_vnet within the hana_rg resource group. The vnet will have two subnets, each of 255 addresses, but you can reduce that number for the back end if you like. I won't enable any security features at this time. That's validated successfully, so I'll hit create. Next, we create an availability set within our resource group and in the same region as the network. Now the virtual machines. I'll create two, hana1 and hana2. They will be identical, using the Suse Enterprise Linux for SAP image and belonging to the availability set we just created. As this is a demo of configuring the network and load balancer, I won't bother adding data disks. Of course, carrying on and installing Pacemaker clustering will require the VM's to have disks attached. Under networking, choose the virtual network we've just created and the annoyingly misspelled backend subnet. The machines behind the internal load balancer aren't exposed to the internet, so they won't have a public IP address. Everything else can remain as default.

Once the VM's have been provisioned, we can create the load balancer. It will be deployed into the same resource group and region and is internal. Use the standard SKU. It has more features, better performance, and requires less configuration. Add a front end IP, selecting the virtual network's front end subnet, making the assignment static, and give it an internal IP address. Next, we add the VM's to the load balancer backend pool by clicking the add button and then choosing the virtual machines.

After the load balancer has been provisioned, we can set up the health probe by going into heath probes under settings. Give the health probe a name, leave the protocol as TCP and change the port to 62503. Interval and unhealthy threshold can remain as is. Click add. The last thing we need to do from an infrastructure point of view is add a load balancing rule. Here we select the various resources we've just set up. Choose the front end IP address from the drop-down and check HA ports. Select the backend pool and the health probe. Finally, make sure floating IP is enabled and click add.

About the Author
Learning Paths

Hallam is a software architect with over 20 years experience across a wide range of industries. He began his software career as a  Delphi/Interbase disciple but changed his allegiance to Microsoft with its deep and broad ecosystem. While Hallam has designed and crafted custom software utilizing web, mobile and desktop technologies, good quality reliable data is the key to a successful solution. The challenge of quickly turning data into useful information for digestion by humans and machines has led Hallam to specialize in database design and process automation. Showing customers how leverage new technology to change and improve their business processes is one of the key drivers keeping Hallam coming back to the keyboard.