Step-by-Step Technical Guide: Configuring Bi-Directional (Active-Active) Replication with OCI GoldenGate

In this guide, we will walk through the precise configuration steps required to establish a bi-directional replication flow between US-Phoenix-1 and US-Ashburn-1 using the OCI GoldenGate Service. Our goal is to create an “Always-On” Active-Active architecture where both regions are live and data is synchronized instantaneously.


 Prerequisites

Ensure the following components are ready before starting the configuration:

  1. Two Autonomous Databases (AJD or ATP): One running in Phoenix, the other in Ashburn.
  2. Networking: Proper VCN and subnet configurations for GoldenGate deployments. (Ensure security rules allow traffic if using private endpoints).
  3. IAM Policies: Ensure you have the necessary permissions to manage GoldenGate and Database services.

Phase 1: Creating High Availability GoldenGate Deployments

The first step is to provision the GoldenGate infrastructure in both regions.

1. Phoenix (Region A) Deployment:

  • In the OCI Console, navigate to Oracle Database > GoldenGate > Deployments.
  • Click Create Deployment.
  • Name: Provide a clear name (e.g., GG-Deployment-PHX).
  • OCPU Count: Enable Auto Scaling to optimize costs based on workload.
  • Technology: Select Oracle Database.

2. Ashburn (Region B) Deployment:

  • Switch your region to Ashburn.
  • Repeat the steps above to create GG-Deployment-ASH.

Phase 2: Registering and Assigning Database Connections

GoldenGate must be “introduced” to your databases to capture and apply data.

  1. Create Connections: Under the GoldenGate Connections tab, create a connection for both your Phoenix and Ashburn databases.
  2. Assign Connections:
    • Go to the Phoenix Deployment details page.
    • Under Assigned Connections, click Assign Connection and select the Phoenix DB.
    • Repeat this in the Ashburn region for the Ashburn DB.

Phase 3: Setting Up Replication (Phoenix → Ashburn)

We will now enter the GoldenGate Administration Console to configure the data stream.

Step A: Adding the Extract (Phoenix)

The “Extract” process captures Change Data Capture (CDC) information from the source.

  1. In the Phoenix deployment, click Launch Console.
  2. Click Add Extract (plus icon).
  3. Type: Choose Integrated Extract.
  4. Process Name: e.g., EXT_PHX.
  5. Source: Select the Phoenix database credential alias.
  6. Register: Ensure “Register to PDB” is checked.

Step B: Adding the Distribution Path (Phoenix → Ashburn)

This creates the “bridge” that sends data from Phoenix to the Ashburn deployment.

  1. In the Phoenix Console, navigate to Distribution Service.
  2. Click Add Path (+).
  3. Target Authentication Method: OGG.
  4. Target Host: Enter the Deployment URL of your Ashburn GoldenGate instance.
  5. Port: 443.

Step C: Adding the Replicat (Ashburn)

This process applies the incoming data to the Ashburn database.

  1. Open the Ashburn GoldenGate Console.
  2. Click Add Replicat.
  3. Source: Select the trail file arriving from Phoenix.
  4. Parameter File (Mapping): Enter the following mapping rule:

Phase 4: Closing the Loop (Ashburn → Phoenix)

To complete the Active-Active setup, you must mirror the steps in Phase 3 for the reverse direction:

  1. Extract (Ashburn): Create EXT_ASH in the Ashburn console.
  2. Distribution Path (Ashburn → Phoenix): Route data from Ashburn to the Phoenix Deployment URL.
  3. Replicat (Phoenix): Create REP_PHX in the Phoenix console with the same mapping rule.

5. Validation and Testing

Once all processes (Extracts, Paths, Replicats) show a Running status in both regions, your system is live.

Testing Steps:

  1. Insert a record into the Phoenix database.
  2. Verify the record appears instantly in Ashburn.
  3. Insert a record in Ashburn and verify it appears in Phoenix.

Conclusion: You have successfully configured a robust, bi-directional replication pipeline. This setup ensures that your MongoDB API workloads remain synchronized across regions, providing a foundation for true disaster recovery and global load balancing.

Resources