Global Site
Displaying present location in the site.
March 29th, 2022
Machine translation is used partially for this article. See the Japanese version for the original article.
Introduction
We tried building an HA cluster across regions on Oracle Cloud Infrastructure (hereinafter called “OCI”).
In OCI, VCN peering allows you to interconnect networks between virtual cloud networks (hereinafter called “VCN”),
allowing you to build HA clusters with diverse network configurations.
This time, we will introduce the procedure for building an HA cluster across regions using VCN peering.
Contents
1. What is VCN Peering?
VCN peering is a function that connects multiple VCNs, and there are two types.
- ・Local VCN Peering
Connect VCNs within the same region. - ・Remote VCN Peering
Connect VCNs across regions.
Resources in the peered VCN can be connected directly to the resources in the other VCN.
Traffic between VCNs can communicate using private IP addresses without routing traffic over the Internet or on-premises networks.

2. HA Cluster Configureation
This time, we will build a two-node mirror disk type cluster using dynamic DNS resources.
Compute instance is located in the Ashburn and Phoenix regions respectively, and use remote VCN peering to connect VCNs. In addition, create a DNS server in the Ashburn region and use it to switch destinations.
* For verification purposes, only one DNS server is configured.
If you would like to propose or introduce the configuration of this blog, please consider the availability of DNS servers.
The configuration diagram is as follows. Use the dynamic DNS resources to switch the destinations to the server where your business application is running.
3. HA Cluster Configureation Procedure
The configuration of networks and compute instances is as follows:
- VCN
- ■Name
- ・vcn-ashburn
- ■IPv4 CIDR Block
- ・10.0.0.0/16
- ■Subnet
- ・10.0.1.0/24
- ■Compute instance
- ・Server1 : 10.0.1.120
Phoenix Region
- VCN
- ■Name
- ・vcn-phoenix
- ■IPv4 CIDR Block
- ・192.168.0.0/16
- ■Subnet
- ・192.168.1.0/24
- ■Compute instance
- ・Server2 : 192.168.1.120
3.1 Creating Remote VCN Peering
This section introduces the procedure for peering connection between a VCN in Ashburn Region (vcn-ashburn) and a VCN in Phoenix Region (vcn-phoenix) using the OCI console.
The procedure for creating remote VCN peering was refered to the following site.
- Using the Console
→ Creating a DRG

- Using the Console
→ To create a remote peering connection
1. Create Dynamic Routing Gateway
In each region, create a dynamic routing gateway(hereinafter called ” DRG”).
DRGs can be created from [Networking] > [Customer Connectivity] > [Dynamic Routing Gateways].
2. Create Dynamic Routing Gateway Attachment
Attach the DRG created in "1. Creating Dynamic Routing Gateway" to the VCN in each region.
After selecting the target VCN, under [Resources], click [Dynamic Routing Gateways Attachments].
As in the image below, click [Create DRG Attachment] and select the DRG you created.
3. Create Remote Peering Connection
Create a remote peering connection (hereinafter called “RPC”) for each DRG created in "1. Creating Dynamic Routing Gateway".
After selecting the target DRG, under [Resources], click [Remote Peering Connections Attachments].
As in the image below, click [Create Remote Peering Connection] to create an RPC.
Also, view the details of the RPC created in the Ashburn region and click [Establish Connection].
Enter the region to which you want to connect (Phoenix) and the remote peering connection OCID (OCID of the RPC to which you are connecting).
4. Set up Route Rules
Select the target VCN in each region, under [Resources], click [Route Tables] to add a route rule.
See the following rules for the rules to be add.
vcn-ashburn | vcn-phoenix | |
---|---|---|
Target Type | DRGs attached to the VCN | |
Destination CIDR Block | 192.168.0.0/16 | 10.0.0.0/16 |
5. Set up Security List
Go to [Security Lists] in each VCN and add Ingress Rules.
Refer to the following guides for the port numbers that you add.

- EXPRESSCLUSTER X 4.3 > EXPRESSCLUSTER X 4.3 for Windows > Getting Started Guide
→ 6 Notes and Restrictions
→ 6.2.2 Communication port number
- EXPRESSCLUSTER X 4.3 > EXPRESSCLUSTER X 4.3 for Linux > Getting Started Guide
→ 6 Notes and Restrictions
→ 6.3.1 Communication port number
3.2 Procedure for Building an HA Cluster
For the procedure to build an HA cluster, see “4 Mirror Disk Type Cluster Creation Procedure”, in the HA Cluster Configuration Guide for OCI.

- Windows > Cloud > Oracle Cloud Infrastructure > EXPRESSCLUSTER X 4.3 HA Cluster Configuration Guide for Oracle Cloud Infrastructure (Windows)
- Linux > Cloud > Oracle Cloud Infrastructure > EXPRESSCLUSTER X 4.3 HA Cluster Configuration Guide for Oracle Cloud Infrastructure (Linux)

- EXPRESSCLUSTER X 4.3 > EXPRESSCLUSTER X 4.3 for Windows > Reference Guide
→ 3 Group resource details
→ 3.15 Understanding dynamic DNS resources
- EXPRESSCLUSTER X 4.3 > EXPRESSCLUSTER X 4.3 for Linux > Reference Guide
→ 3 Group resource details
→ 3.15 Understanding Dynamic DNS resources
4. Checking the Operation
The following procedure confirms that data is mirrored between servers located in different regions using EXPRESSCLUSTER's mirroring function.
- 1. Start the HA cluster.
(Failover group is activated on Server1) - 2. On Server1, write data in the data partition.
- 3. From Server1 to Server2, move the failover group.
- 4. On Server2, confirm that the data written in Server1 in step 2 exists in the data partition.
5. Hybrid Disk Type Cluster
In a previous blog , we introduced how to build a shared disk type HA cluster on OCI.
By combining the multi-attach feature used in that blog with remote VCN peering, it is possible to build a hybrid disk type cluster on OCI.
A hybrid disk type cluster behaves like a shared disk type cluster on the main site, so that local failures within the site (application failure/IaaS failure, etc.) occurs, you can continue business with an instance in the same site.
On the other hand, between sites, EXPRESSCLUSTER’s mirroring function allows data on shared disks to be mirrored between sites, disaster countermeasures can be implemented at the same time.
Conclusion
This time, we introduced the procedure for building an HA cluster across regions used remote VCN peering. Remote VCN peering is a very convenient way to easily connect VCNs even if they are in different regions.
If you consider introducing the configuration 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.