Global Site
Displaying present location in the site.
May 20th, 2022
Machine translation is used partially for this article. See the Japanese version for the original article.
Introduction
We tried building an HA cluster between Azure Virtual Machines (hereinafter called “VM”) located in different regions using the cross-region load balancer on Microsoft Azure (hereinafter called “Azure”).
The cross-region load balancer, previewed in 2021, are load balancers that can load balance traffic between different regions.
EXPRESSCLUSTER's guide shows the configuration that we used Azure Load Balancer to switch destinations, but until now, Azure Load Balancer was available to load balance only in the same regions, so we were not available to switch destinations between VMs located in different regions. Therefore, in the previous blog, when building HA cluster between VMs located in different regions on Azure, we used Azure DNS to switch destinations.
This time, we tried building an HA cluster between VMs located in different regions using the cross-region load balancer to switch destinations.
- * The cross-region load balancer is in preview phase as of April 11th, 2022 and has some limitations. This article uses it under the features and limitations provided as a preview version.
Cross-region load balancer (Preview)
Contents
- 1. What is a Cross-region Load Balancer?
- 2. Overview of HA Cluster Configuration
- 2.1 Overview of HA Cluster Configuration in This Time
- 2.2 (Reference) Advanced Configuration with Floating IP Enabled
- 3. HA Cluster Building Procedure
- 3.1 Microsoft Azure Settings
- 3.2 EXPRESSCLUSTER Settings
- 4. Checking the Operation
1. What is a Cross-region Load Balancer?
Cross-region load balancer are load balancers that can load balance traffic between different regions. Until now, load balancing using Azure Load Balancer was limited to within the same region, but now, among the available SKUs for Azure Load Balancer, Standard load balancer supports cross-region load balancing. This allows incoming traffic to be load balanced to public load balancers located in different regions. In addition, the public load balancer can load balance traffic received from the cross-region load balancer to VMs in the virtual network of the region where they reside. This allows users to access VMs located in different regions through the public IP addresses granted to the cross-region load balancer.
2. Overview of HA Cluster Configuration
2.1 Overview of HA Cluster Configuration in This Time
This time, we will build a mirror disk type cluster across the East US region and the West US region using the cross-region load balancer, and confirm that the destination can be switched between VMs.
When using a cross-region load balancer, there are limitations on the regions that we can deploy it on and the types of load balancer that we can add it to the backend pool. For more information about the limitations, see the "Cross-region load balancer (Preview)" link below.
The HA cluster configuration to be built this time is as follows:
- - Create VMs for building HA cluster in the East US region and the West US region, respectively.
- - Locate public load balancers in the East US and West US regions and add VMs created in the backend pool.
- - Use the cross-region load balancer to switch destinations.
- - Locate the cross-region load balancer in the Central US region.
- - Add public load balancers created in the East US and West US regions to the backend pool of the cross-region load balancer.
- - Connect virtual networks in the East US region and the West US region using global virtual network peering.
- - Use IIS as an application for HA cluster.
- - Locate the client outside Azure's virtual network. Access IIS of active VMs from the frontend IP of the cross-region load balancer over the Internet.
- * You must select the location of the cross-region load balancer from the home region. This time, we will locate it in the Central US region.
- * The backend pool of the cross-region load balancer must be selected from the public load balancers that exist in the participating regions. This time, select the public load balancer in the East US and West US regions.
- * Load balancing rules for HA ports are not available because you cannot add an internal load balancer to the backend pool of the cross-region load balancer.
- * If you locate clients in the East US or West US regions, you can still access IIS by specifying the frontend IP of the cross-region load balancer.
2.2 (Reference) Advanced Configuration with Floating IP Enabled
This time, we are building an HA cluster with the Azure load balancer's floating IP (Direct Server Return(hereinafter called “DSR”)) function disabled, but it is also possible to build an HA cluster with the floating IP (DSR) function enabled. In addition, although we are building a mirror disk type cluster, it is possible to build a hybrid disk type cluster as follows.
3. HA Cluster Building Procedure
3.1 Microsoft Azure Settings
For procedure on building an HA cluster, refer to "5 Cluster Creation Procedure (for an HA Cluster Using an Public Load Balancer)" in the "HA Cluster Configuration Guide for Microsoft Azure".
In the following sections, we will focus on the differences from the guide when building a mirror disk type cluster using a cross-region load balancer.
- Windows > Cloud > Microsoft Azure > EXPRESSCLUSTER X 4.3 HA Cluster Configuration Guide for Microsoft Azure (Windows)
- → 5 Cluster Creation Procedure (for an HA Cluster Using an Public Load Balancer)
In each section of "5.2 Configuring Microsoft Azure" in the "HA Cluster Configuration Guide for Microsoft Azure", set up as follows.
- - In the "Creating a virtual network" section, virtual network "Vnet2" is created in addition to the "Vnet1". In order to connect "Vnet1" and "Vnet2", you will additionally configure the virtual network peering settings.
- - In the "Creating a virtual machine" section, create one VM in the East US region and the West US region.
- - In the "Configuring a load balancer" section, you create public load balancers in the East US and West US regions, and add VMs created for each region to the backend pool.
- - After you create the public load balancer, create a cross-region load balancer in the Central US region and add the public load balancer you created to the East US and West US regions to the backend pool.
3.1.1 Creating a Resource Group
Use the Azure portal to create resource groups to manage resources.
Resource group settings | |
---|---|
Name | TestGroup1 |
Region | East US |
3.1.2 Creating Virtual Networks
Use the Azure portal to create a virtual network "Vnet1" in the East US region, as well as a virtual network "Vnet2" in the West US region.
Virtual networks settings | ||
---|---|---|
Name | Vnet1 | Vnet2 |
Region | East US | West US |
IPv4 address space | 10.5.0.0/24 | 10.6.0.0/24 |
Subnet name | Vnet1-1 | Vnet2-1 |
Subnet address range | 10.5.0.0/24 | 10.6.0.0/24 |
Setting up Virtual Network Peering
After you create "Vnet1" and "Vnet2", you configure virtual network peering to connect between virtual networks. For more information on the steps, see the following article.
We Tried Building an HA Cluster Across Regions Using Virtual Network Peering on Azure (Windows/Linux)
→ 3.2 Creating Virtual Network Peering
3.1.3 Creating VMs
Use the Azure Portal to create one VM in the East US region and the West US Region.
Virtual machines settings | ||
---|---|---|
Virtual machine name | Server 1 (Active VM):server01 | Server 2 (Standby VM):server02 |
Region | East US | West US |
Network interface settings | ||
IP Configurations | ipconfig1 (primary):10.5.0.120 | ipconfig1 (primary):10.6.0.120 |
3.1.4 Creating Load Balancers
Creating Public Load Balancers
Use the Azure portal to create public load balancers in the East US and West US regions. Also, add the VM for building cluster that you created in each region to the backend pool of the public load balancer.
The following is an example of setting up a public load balancer in the East US region.
Select "Public" for Type, "Standard" for SKU, and "Regional" for Tier.
Public load balancer settings | ||
---|---|---|
Name | TestLoadBalancer-EUS | TestLoadBalancer-WUS |
Region | East US | West US |
SKU | Standard | Standard |
Type | Public | Public |
Tier | Regional | Regional |
Then set up [Frontend IP configuration], [Backend pools], and [Inbound rules(Health probe, Load balancing rule)]. Do not set [Outbound rules].
Frontend IP configuration settings
Click [+ Add a frontend IP Configuration] to set it.
Frontend IP configuration settings | ||
---|---|---|
Region | East US | West US |
Name | TestLoadBalancerFrontEnd-EUS | TestLoadBalancerFrontEnd-WUS |
Public IP address Name | TestLoadBalancerPublicIP-EUS | TestLoadBalancerPublicIP-WUS |
Availability zone | 1 | 1 |
Backend pools settings
Click [+ Add a backend pool] to set it.
Backend pools settings | ||
---|---|---|
Region | East US | West US |
Name | TestBackendPool-EUS | TestBackendPool-WUS |
Virtual machines | Server 1 (Active VM):server01 | Server 2 (Standby VM):server02 |
Inbound rules settings
Click [+ Add a load balancing rule] to set it. Also, click [Create New] to set up a [Health probe].
Load balancing rule settings | ||
---|---|---|
Region | East US | West US |
Name | TestLoadBalancingRule-EUS | TestLoadBalancingRule-WUS |
Port | 80 | 80 |
Backend port | 8080 | 8080 |
Health probe settings | ||
---|---|---|
Region | East US | West US |
Name | TestHealthProbe-EUS | TestHealthProbe-WUS |
Port | 26001 | 26001 |
Inbound security rules settings
After you have created the public load balancer, set up network security group for VMs you added to the East US and West US regions.
Add the backend port that you set in the load balancing rules of the public load balancer to the inbound security rules.
Inbound security rules settings | ||
Virtual machines | server01 | server02 |
Name | TestHTTP | TestHTTP |
Protocol | TCP | TCP |
Destination port ranges | 8080 | 8080 |
The procedure for the creating a public load balancer was refered to the following site:
Creating a cross-region load balancer
Use the Azure portal to create cross-region load balancer in the Central US region.
Select "Public" for Type, "Standard" for SKU, and "Global" for Tier.
Cross-region load balancer settings | ||
---|---|---|
Name | TestLoadBalancer-CUS | |
Region | Central US | |
SKU | Standard | |
Type | Public | |
Tier | Global |
Then set up [Frontend IP configuration], [Backend pools], and [Inbound rules(Load balancing rule). Do not set [Outbound rules].
Add the public load balancers you created in the East US and West US regions to the backend pool.
Frontend IP configuration settings
Click [+ Add a frontend IP Configuration] to set it.
Frontend IP configuration settings | ||
---|---|---|
Name | TestLoadBalancerFrontEnd-CUS | |
Public IP address Name | TestLoadBalancerPublicIP-CUS |
Backend pools settings
Click [+ Add a backend pool] to set it.
Backend pools settings | ||
---|---|---|
Name | TestBackendPool-CUS | |
Load balancer | Public Load Balancer (East US):TestLoadBalancer-EUS | Public Load Balancer (West US):TestLoadBalancer-WUS |
Frontend IP configuration | Public Load Balancer (East US):TestLoadBalancerFrontEnd-EUS | Public Load Balancer (West US):TestLoadBalancerFrontEnd-WUS |
Inbound rules settings
Click [+ Add a load balancing rule] to set it.
The backend port of the load balancing rule for the cross-region load balancer must match the port (frontend port) of the load balancing rule for the public load balancer created in the East US and West US regions.
- * When you enter a port, the backend port reflects the same value.
Load balancing rule settings | ||
---|---|---|
Name | TestLoadBalancingRule-CUS | |
Port | 80 |
The procedure for the creating a cross-region load balancer was refered to the following site:
3.2 EXPRESSCLUSTER Settings
Build a mirror disk type cluster on Azure using a cross-region load balancer.
EXPRESSCLUSTER X 4.3 for Windows (Internal Ver. 12.30) is used for this verification.
Register three resources in EXPRESSCLUSTER's failover group: Azure probe port resource, mirror disk resource, and service resource.
This time, we will use IIS as an application for HA cluster. Since the start/stop of IIS is controlled by EXPRESSCLUSTER's service resource, we will install IIS in advance and set the startup type of IIS to manual. In addition, change the port number when accessing IIS to 8080 and add a virtual directory so that the test.html is placed under the mirror disk (data partition).
After setting up IIS, use the Cluster WebUI to set up service resource. Set the service name to World Wide Web Publishing Service.
EXPRESSCLUSTER settings | ||
---|---|---|
Server name | server01 | server02 |
Failover Group (failover) | ||
Azure probe port resource | Probeport: 26001 | |
Mirror disk resource | Data Partition Drive Letter: G:\ | |
Cluster Partition Drive Letter: F:\ | ||
Service resource | Service Name: World Wide Web Publishing Service (IIS) |
4. Checking the Operation
Place the client outside Azure's virtual network and verify that client can access the server01 and server02 using the frontend IP (public IP) of the cross-region load balancer over the Internet.
- 1.Start failover group on server01.
- 2.Verify that the client can connect to the frontend IP (public IP) of the cross-region load balancer and access IIS of server01 (refer to test.html).
- 3.From the Cluster WebUI, manually move the failover group to server02. Edit and save the test.html file on server02.
- 4.Verify that the client can connect to the frontend IP (public IP) of the cross-region load balancer and access the IIS of server02 (refer to test.html).
By moving the failover group, we were able to verify that each VM could be accessed from the frontend IP (public IP) of the cross-region load balancer.
Conclusion
This time, we introduced the procedure for building a mirror disk type cluster using a cross-region load balancer to switch destinations between different regions.
The cross-region load balancer is currently in preview phase, but when it is officially released, we would like to publish the procedure for building an HA cluster with DSR enabled.
If you consider introducing the configurations described in this article, you can perform a validation with the trial module of EXPRESSCLUSTER. Please do not hesitate to contact us if you have any questions.