High Availability (HA) for Azure (Resource Manager)

 

1Introduction

Microsoft Azure has two different models for deploying services: Resource Manager and Classic. The main body of this guide covers setting up the LoadMaster with High Availability using the Resource Manager method. For steps using the Classic method, please refer to the HA for Azure (Classic Interface), Feature Description.

When deploying an application using the Microsoft Azure Infrastructure as a Service (IaaS) offering, you usually need to provide load balancing and other application delivery functions such as content switching, SSL Termination and IPS. Some of this functionality may also be necessary when deploying applications in Microsoft Azure Platform as a Service (PaaS). KEMP’s LoadMaster for Azure enables you to address your needs of application delivery and High Availability (HA).

Deploying a single LoadMaster for Azure does not provide you with the high availability you need for your applications. When deploying a pair of LoadMasters in Azure, you can achieve high availability for your application. This document provides the details for a HA KEMP LoadMaster solution.

When using LoadMaster in High Availability on Azure, HA operates in much the same way as it does on non-cloud platforms, but with some key differences, which are listed below:

  • LoadMaster HA for Azure involves two LoadMasters that synchronize settings bi-directionally. Changes made to the master are replicated to the slave and changes made to the slave are replicated to the master.
  • The replication (synchronization) of settings (from master to slave) is not instant in all cases and may take a few moments to complete.
  • When synchronizing the GEO settings from master to slave, any Fully Qualified Domain Name (FQDN) or cluster IP addresses that match the master’s IP address are replaced with the slave’s IP address. Likewise, when synchronizing from slave to master, the slave’s IP address is replaced with the master’s IP address.
  • All user-defined settings are synchronized, with the exception of the following:

Default gateway (both IPv4 and IPv6)

IP addresses and netmasks

Hostname

Name server

Domain

Admin default gateway

Administrative certificate settings (.cert, .pem and .setadmin files)

Network interface settings: Link Status (Speed and Duplex), MTU and additional addresses

Virtual LAN (VLAN) configuration

Virtual Extensible LAN (VXLAN) configuration

Interface bonding

Additional routes

  • The cloud HA LoadMaster does not have a “force update” option.
  • If the master unit fails, connections are directed to the slave unit. The master unit is the master and will never become the slave, even if it fails. Similarly, the slave unit will never become the master. When the master unit comes back up, connections will automatically be directed to the master again.
  • The HA Check Port must be set to the same port on both the master and slave units for HA to work correctly.
  • Depending on the design of the Network Security Groups, you must ensure the necessary ports are open inbound to allow for the traffic.

Figure 1‑1: HA Failover

A complete description of non-cloud LoadMaster HA can be found in the High Availability (HA), Feature Description document.

2Prerequisites

The following prerequisites must be met before proceeding to a high availability configuration:

  • An Azure Resource Manager (ARM) (V2) Virtual Network added to Azure to place the LoadMaster VMs
  • Application VMs deployed in Azure in the Virtual Network
  • An Azure Internal Load Balancer deployed to create the high availability pair
  • Two ARM LoadMaster VMs deployed in Azure on the same Virtual Network as the Application VMs

Both LoadMasters should be configured to be part of an availability set

The following diagram provides overview of the configuration described above:

Figure 2‑1: Example architecture

To configure high availability using the LoadMaster, the following configuration must be in place:

  • Application VMs are installed and configured
  • LoadMaster for Azure VMs are installed and configured
  • Important: The HA Check Port must be set to the same port on both the master and slave units for HA to work correctly. The same port must be configured as the probe port on the Internal Load Balancer.
  • The following management Load Balanced NAT Rules must be set up for access to the LoadMasters:

TCP Port 22 for SSH access

TCP Port 8443 for Management Web User Interface (WUI) access

  • Additional Load Balanced Rules for any traffic that is being transmitted through the LoadMaster

Use this table to record the necessary information required to create the LoadMaster Pair in Azure:

Fields Required for creation of LoadMaster Pair

Primary LoadMaster Name

 

Secondary LoadMaster Name

 

Pricing Tier

 

Password for LoadMasters

 

Availability Service Name

 

Resource Group Name

 

Virtual Network

 

Internal Load Balancer Name

 

Internal Load Balancer Public IP Address (PIP), if required

 
   

Table 3-1: Required Fields

3Manually Configure LoadMaster HA in Azure

The steps in this section were correct at the time of writing. However, the Azure interface changes regularly so please refer to Azure documentation for up-to-date steps if needed.

Please complete the prerequisites documented in the earlier section.

3.1Licensing Options

There are two main licensing options when deploying a LoadMaster for Azure:

  • Hourly consumption
  • Bring Your Own License (BYOL)

To use the BYOL option, follow the steps below:

  1. Download the BYOL – Trial and perpetual license versionof the Virtual LoadMaster (follow the steps in the section below to do this).
  1. Contact a KEMP representative to get a license.
  2. Update the license on your LoadMaster to apply the license change (System Configuration > System Administration > Update License).

3.2Recommended Pricing Tier

When creating a LoadMaster for Azure Virtual Machine, you must select a pricing tier. The recommended pricing tiers are listed in the table below.

If the relevant pricing tier is not displayed in Azure, click View all.

VLM Model

Recommended Pricing Tier

VLM 200

A1, A2, A3

VLM 2000

A2, A3, A4

VLM 5000

A3, A4, A5

VLM 10G

A7, A8, A9

Table 4-1: Recommended Pricing Tiers

3.3Create an SSH Key Pair

When creating a LoadMaster for Azure VM, there are two options for authentication - a password or an SSH public key. KEMP recommends using a password, but either way will work fine. If you choose to use a password, this section can be skipped and you can move on to Section 3.4 to create the LoadMaster for Azure VM. If you choose to use an SSH public key, an SSH key pair will need to be created.

To create an SSH key pair, you will need to use a program such as the PuTTYgen or OpenSSH. As an example for this document, the steps in PuTTYgen are below:

  1. Open PuTTYgen.

Figure 3‑1: Generate

  1. Click Generate.

Figure 3‑2: Randomness

  1. Move the mouse over the blank area in the middle. This generates a random pattern that is used to generate the key pair.

Figure 3‑3: Copy the Public Key

  1. Copy and save the public and private key as needed.

It is recommended to store SSH keys in a secure location.

3.4Creating First Virtual LoadMaster in Azure

The steps in this document reflect the steps in the Azure Marketplace (http://portal.azure.com).

The following procedure describes how to set up LoadMaster for Azure from the Microsoft Azure portal:

The steps below are carried out from http://portal.azure.com and not from http://manage.windowsazure.com.

Figure 3‑4: Marketplace

  1. From the Azure Management Portal dashboard, click Marketplace.

Figure 3‑5: New

  1. In the Marketplace section, click New.

Figure 3‑6: Search

  1. Type KEMP in the search field and press Enter on your keyboard.

Figure 3‑7: KEMP images

  1. Select the appropriate KEMP Virtual LoadMaster image to deploy.

Figure 3‑8: Create

  1. Select Resource Manager.
  2. Click Create.

Figure 3‑9: Details

  1. Provide details in the Create VM section. The details required to create new VM are:

a)Host Name: Provide a unique name for VM identification

b)User Name: This will not be used by LoadMaster for Azure. Provide a name of your choice. The default username for accessing the LoadMaster is bal.

c)Fill out the authentication details. There are two possible methods of authentication - using a password or an SSH key. Depending on what you select, complete the relevant step below:

  • Password: Enter a password.

This password is used to access the LoadMaster WUI.

  • SSH Public Key: Paste the SSH public key which was created in Section 3.3. The private key is needed to connect to the LoadMaster using SSH.

It is recommended to store SSH keys in a secure location.

  1. Use an existing or create a new Resource Group for the LoadMasters to be a part of.
  2. Select the Location in which to deploy the LoadMaster.
  3. Click OK.

Figure 3‑10: View all

  1. Select from the recommended pricing tiers. Click View all if the recommended pricing tiers do not meet the recommended requirements (see Section 3.1 for further information regarding what tier to select).

Figure 3‑11: Settings

  1. Select the relevant Storage Account, or create a new one if needed.
  2. Select an existing Virtual network, or create a new one if needed.

A Public IP Address (PIP) is not required for each of the LoadMasters. A single PIP is created for the Azure Load Balancer and NAT Translation Rules are created to allow management access.

  1. Select the relevant Network security group, or create a new one if needed.

If the LoadMaster is public-facing, the security group should contain rules for port 8441, 8442, 8443, 8444, 22, 221, 222, the Virtual Service ports (such as 80, 443) and any other ports that are needed by the backend.

Figure 3‑12: Availability Set

  1. Select Disabled for Diagnostics.
  2. Click Availability set.

Figure 3‑13: Create Availability Set

  1. Click Create new.

Figure 3‑14: Create Availability Set

  1. Provide a unique Name for the Availability Set.
  2. Click OK.

Figure 3‑15: Availability

  1. Click OK.

Figure 3‑16: Validation

  1. Confirm that Validation Passed.
  2. Click OK.

Figure 3‑17: Purchase

  1. Click Purchase.

3.5Create the Second LoadMaster in Azure

The process of setting up the second LoadMaster for Azure is similar to the first with a few exceptions, which are listed below.

  • You must select the same Virtual Network that was used during the first LoadMaster deployment.
  • You must select the same Availability Set that was created during the first LoadMaster deployment.

4 Create the Internal Load Balancer

An Azure Internal Load Balancer must be deployed to monitor the health of the LoadMasters and direct traffic accordingly.

The following procedure describes how to set up an Azure Load Balancer from the Microsoft Azure portal:

The steps below are carried out from http://portal.azure.com and not from http://manage.windowsazure.com.

Figure 5-1: Browse

  1. From the Azure Management Portal dashboard, click Browse.

Figure 4‑1: Load balancers

  1. Scroll down to and select Load balancers.

Figure 4‑2: Add

  1. Click Add.

Figure 5-6: Load Balancer

  1. Provide the necessary information for the Load Balancer:

a)Assign the Load Balancer a Name.

b)Select whether or not the Load Balancer is made available to the Internet (Public or Internal).

c)Assign the same Resource group as the LoadMasters.

d)Select the Location.

  1. Click Create.

5Configure the Azure Load Balancer

There are several settings that need to be configured to provide the high availability of the LoadMasters.

  • Create a backend address pool and add the LoadMasters to the pool.
  • Create Inbound NAT rules to direct traffic to the appropriate LoadMaster.
  • Create a Probe to monitor the health of the LoadMasters.
  • Create Load Balancing Rules to allow the necessary traffic.

Refer to the sections below for further information on each of these.

5.1Create a Backend Pool

The Backend Pool is a collection of virtual machines (LoadMasters) which is load balanced in order to provide High Availability.

Figure 6-1: Load Balancer

  1. In the left hand navigation, click Browse.

 

 

Figure 6-2: Load balancers

  1. Select Load balancers.
  2. Select the internal load balancer that was created in Section4.

Figure 6-3: Settings

  1. Click All settings.
  2. Click Backend pools.

Figure 6-5: Add

  1. Click Add.

Figure 6-6: Pool

  1. Provide a Name for the Backend Pool.
  2. Click Add a virtual machine.
  3. Select the relevant Availability set.

Figure 6-7: Select LoadMasters

  1. Select the two LoadMasters.
  2. Click Select.
  3. Click OK.

5.2Create Inbound NAT rules

Figure 5‑1: NAT Rules

Inbound NAT rules will provide a translation for management access into each of the LoadMasters in the Backend pool. Each LoadMaster does not require a Public IP Address (PIP). A unique port will need to be configured in an Inbound NAT rule for each LoadMaster. The rules are the following:

Target

Port

Target Port

LoadMaster1 - WUI

8441

8443

LoadMaster1 – SSH

221

22

LoadMaster2 – WUI

8442

8443

LoadMaster2 – SSH

222

22

Table 5‑1: NAT rules

Figure6-8: Load Balancer

  1. In the left hand navigation, click Browse.

 

Figure 6-9: Load balancers

  1. Select Load balancers.
  2. Select the load balancer that was created in Section4.

Figure 6-10: Settings

  1. Click All settings.
  2. Click Inbound NAT rules.

Figure 6-11: Add

  1. Click Add.

Figure 6-12: Inbound NAT Rule

  1. Provide the following information

a)Provide a Name.

b)Select Custom as the Service.

c)Select TCP.

d)Enter 8441 as the Port.

e)Click Target.

Figure 6-13: Choose VM

  1. Select the LoadMaster to associate this rule with (LM1).

Figure 6-14: Inbound NAT Rule

  1. Provide the following information:

a)Select Custom as the Port mapping.

b)Select Disabled for Floating IP.

  1. Enter 8443 as the Target Port.
  2. Click OK.

Use Table 51 above to run through steps 6 to 10 to create additional NAT rules.

5.3Create a Probe to Monitor LoadMaster Health

A probe must be created to monitor the health of the LoadMasters. This probe will determine which LoadMaster is active and send the necessary traffic. Should that LoadMaster go offline, the probe will take that LoadMaster out of service and direct all traffic to the secondary LoadMaster.

Figure 6-15: Load Balancer

  1. In the left hand navigation click Browse.

Figure 6-16: Load balancers

  1. Click Load balancers.
  2. Select the load balancer that was create in Section4.

Figure 6-17: Settings

  1. Click All settings.
  2. Select Probes.

Figure 6-18: Add

  1. Click Add.

Figure 6-19: Probe

  1. Provide the following information:

a)Provide a Name.

b)Select HTTP as the Protocol.

c)Enter 8444 as the Port.

d)Enter / as the Path.

e)Enter 5 as the Interval.

f)Enter 2 as the Unhealthy Threshold.

  1. Click OK.
  2. The probe now needs to be changed to an actual HTTP request in order for it to work. This can be done by running a command in Azure PowerShell, for example:

Set-AzureLoadBalancedEndPoint –ServiceName KEMP-HA-LM1 –LBSetName KEMP-LB1 –ProbeProtocolHTTP –ProbePath / -ProbePort 8444 –ProbeIntervalInSeconds 5

5.4Create Load Balancing Rules to Allow Traffic

Load Balancing Rules must be configured for any traffic that is published through the LoadMaster. A Rule is set up for Port 8444 which can be used to check the state of the LoadMasters within the Backend Pool.

Figure 6-20: Load Balancer

  1. In the left hand navigation, click Browse.

 

Figure 6-21: Load balancers

  1. Select Load balancers.
  2. Select the load balancer that was created in Section4.

Figure 6-22: Settings

  1. Click All settings.
  2. Click Load balancing rules.

Figure 6-23: Add

  1. Click Add.

Figure 6-24: Load Balancing Rule

  1. Provide the following information:

a)Provide a Name.

b)Select TCP as the Protocol.

c)Enter 8444 as the Port.

d)Enter 8444 as the Backend Port.

e)Select your Backend Pool.

f)Select the Probe for port 8444.

g)Select None as the Session persistence.

h)Select 4 as the Idle timeout (minutes).

  1. Click OK.

Create additional Load Balancing Rules for any other traffic that is published through the LoadMaster.

6Network Security Groups

Network Security Groups are used in Azure to control what traffic is allowed or denied access to Virtual Machines. Depending on your configuration, you are required to update one or more Network Security Groups in order to allow published traffic to access the LoadMasters and backend Real Servers.

If the LoadMaster is public-facing, the security group should contain rules for port 8441, 8442, 8443, 8444, 22, 221, 222, the Virtual Service ports (such as 80, 443) and any other ports that are needed by the backend.

Do not block port 6973.

7Configure the LoadMasters

To configure LoadMaster for HA, follow the steps outlined in the sections below:

Figure 7-1: Login

  1. Access the WUI of the LoadMaster which is the master unit:

a)Access the WUI of master LoadMaster by going to https://<DNSNameURL>:8441.

b)Access the WUI of the slave LoadMaster by going to https://<DNSNameURL>:8442.

c)The default username is bal and the password is the password entered during the creation of the LoadMaster.

  1. In the main menu, go to System Configuration > HA and Clustering.

Figure 7‑1: HA Mode or Clustering

  1. If you have a clustering license, a screen will appear asking if you want to set up HA Mode or Clustering. To set up HA, select HA Mode and click Confirm.

Figure 7-2: Master Unit

  1. Select Master HA Mode in the Azure HA Mode drop-down list.
  2. Enter the Partner Name/IP address of the slave LoadMaster unit and click Set Partner Name/IP.
  3. Enter 8444 as the Health Check Port and click Set Check Port.

The Health Check Port must be set to 8444 on both the master and slave units for HA to function correctly.

  1. Then, access the WUI of the slave unit. Complete Steps2 to 5 above in the slave unit, but select Slave HA Mode as the Azure HA Mode instead.

HA will not work if both units have the same value selected for the Azure HA Mode.

  1. After configuring both LoadMasters, reboot both units (System Configuration > System Administration > System Reboot > Reboot).

When HA is enabled on both devices, changes made to the Virtual Services in the master unit is replicated to the slave.

C:\Users\kgaffney\Downloads\HA_Cloud\master_active.png

Figure 7-3: Master unit

You can tell, at a glance, which unit is the master, and which is the slave, by checking the mode in the top bar of the LoadMaster.

The current status of each LoadMaster, when HA is enabled, is shown as follows:

C:\Users\kgaffney\Downloads\HA_Cloud\master_active.png

Figure 7-4: Master unit - Active

C:\Users\kgaffney\Downloads\HA_Cloud\slave_active.png

Figure 7-5: Slave unit- Active

C:\Users\kgaffney\Downloads\HA_Cloud\slave_standby.png

Figure 7-6: Slave unit - Stand-By

In addition, it is possible to check which LoadMaster is active by accessing port 8444 through the Public IP address since the Load Balanced Rule was created for this port in section 6.4, that is,

http://<PublicIPofAzureLoadBalancer>:8444

8LoadMaster Firmware Downgrades

Do not downgrade from firmware version 7.2.36 or higher to a version below 7.2.36. If you do this, the LoadMaster becomes inaccessible and you cannot recover it.

9Troubleshooting

The sections below provide some basic troubleshooting tips. If further assistance is required, please contact KEMP Support: https://support.kemptechnologies.com.

9.1Virtual Machine Inaccessible

It takes approximately five minutes for the Virtual Machine to become accessible after booting.

9.2Run a TCP Dump

Running a TCP dump and checking the results can also assist with troubleshooting. To do this, follow the steps below in the LoadMaster WUI:

  1. In the main menu, go to System Configuration > Logging Options > System Log Files.

Figure 8-1: System Log Files

  1. Click Debug Options.
  2. In the TCP dump section, enter the relevant IP Address and the Azure HA Port.
  3. Click Start.
  4. Let the capture run for a few minutes.
  5. Click Stop.
  6. Click Download.
  7. Analyse the results in a packet trace analyser tool such as Wireshark.

Checks from the partner LoadMaster should appear in the results. If nothing is shown there is a problem, for example Azure may be blocking the connection.

9.3Sync Problems

In most scenarios, the configuration settings are automatically synchronized between partners every two minutes. If a new Virtual Service is created, the settings are immediately synchronized. Because of this, creating a new Virtual Service is a good way of checking if the synchronization is working. To trace this, follow the steps below:

  1. Start a TCP dump, as detailed in Section 9.2, but use port 6973.
  1. Create a Virtual Service.
  2. Stop the TCP dump.
  3. Download the TCP dump file.
  4. Analyse the results.

After creating a Virtual Service, a lot of traffic should have been immediately triggered.

Generally, if a lot of packets are being transferred it means that the synchronization is working. If only a few packets are transferred, it may mean that the connection was unsuccessful. In this case, there may be a problem such as unmatched SSH keys.

References

Unless otherwise specified, the following documents can be found at http://kemptechnologies.com/documentation.

Licensing, Feature Description LoadMaster for Azure, Feature Description HA for Azure (Classic Interface), Feature Description Azure Virtual Machines – tutorials and guides:

http://www.windowsazure.com/en-us/documentation/services/virtual-machines/

High Availability (HA), Feature Description

Document History

Date

Change

Reason for Change

Version

Resp.

June 2016

Initial draft

First draft of document

1.0

LB

July 2016

Release updates

Updates for 7.1.35

2.0

LB

Aug 2016

Minor change

Enhancement made

3.0

LB

Sep 2016

Release updates

Updates for 7.2.36

4.0

LB

Was this article helpful?

0 out of 0 found this helpful

Comments

Avatar
support

This article is not clear with the current screenshots

Avatar
Lisa Barry

Hi,

Thank you for your feedback. The screenshot issue was caused during the upload of the document. We have since fixed the issue.

Thanks,
Lisa