Here we will discuss how to switch between nodes using an Azure Internal Load Balancer by creating an Internal Load Balancer that points to the active node. Clients connect to the Frontend IP address provided by the Internal Load Balancer. The VMs are checked regularly by the “Health Check Probe” function and the Internal Load Balancer routes requests to the active node.

Create an IP Resource

On Azure, a client connects to a load balancer so that it can distribute the traffic to the active node. In theory, an IP Resource (that represents a Virtual IP address) is not needed. However, as this section describes later, it is still necessary to create a Virtual IP address.

In Azure’s case, the Virtual IP address should be the same as the IP address for a load balancer in front of these nodes. In the example below we will use the IP address 10.20.0.10.

Create an Internal Load Balancer

An internal load balancer distributes traffic to the active node and can be created using the following steps. In order to configure the load balancer, start the application on node-a to ensure the load balancer is working before configuring it through LifeKeeper.

  1. On the Azure Portal, go to Load Balancer, click “Add”, select the following parameters and then click “Review + Create”. Once the parameters are confirmed, the Load Balancer can be created.
Item
Value
Resource Group LK-QSG
Name LK-ILB
Region (same as the Virtual Machines)
Type Internal
SKU Standard (select Standard as the workload is distributed across Availability Zones)
Virtual Network LK-VNET
Subnet LK-subnet
IP address assignment Static
Private IP Address 10.20.0.10
Availability zone Zone-redundant

  1. Once the load balancer is created, go to the resource page (LK-ILB). Configure the following sections of the load balancer (located in the Setting section on the left side of the Load Balancer configuration page).
  • Backend pools (step 3)
  • Health probes (step 4)
  • Load Balancing Rules (step 5)

  1. Go to the Backend pools page and click “Add”. Once the Backend Pool Page is open, select node-a and node-b from the list of available virtual machines and provide a name for the pool (for example, LK-BackendPool).

  1. Go to the Health Probes page and click “Add”. Select the TCP port number used by the application (e.g., 80 if we are going to protect httpd), then provide a name for the probe (for example, LK-Probe).

  1. Go to the Load Balancing Rule page and click “Add” to create a new rule. Enter the following values:
Item
Value
Name LK-ILB-Rule
Frontend IP address 10.20.0.10
Protocol TCP (assuming your app uses TCP)
Port # Select the Port # in use by the application
Backend Port Same as Port
Backend Pool LK-BackendPool
Health Probe LK-Probe
Session Persistence None
Floating IP Enabled (you can also choose Disabled). See following section for details.

The Difference between Floating IP Options

The difference between Floating IP options determines where the Internal Load Balancer sends packets to.

  • If Disabled is selected, the Load Balancer sends packets to the node’s primary IP.
  • If Enabled is selected, the Load Balancer sends packets to the Virtual IP.

Because the Virtual IP is attached to the active node, it appears to be the same operation. However, if the response from the active node is required to be sent from the Virtual IP, “Enabled” should be selected. This is a more natural way for LifeKeeper to handle these nodes (in the same way as in an on-premise environment). If the application listens only to the primary IP address (for example, 10.20.1.10), the Floating IP parameter should be set to “Disabled”.

フィードバック

フィードバックありがとうございました

このトピックへフィードバック

送信