Wednesday, February 4, 2026

Automated “Multi-Supply” Async Replication Failover Utilizing PXC Replication Supervisor


On this second a part of the weblog submit, we are going to discover how the PXC Replication Supervisor script handles supply and reproduction failover in a multi-source replication topology.

Multi-source replication is usually used when information from a number of impartial sources must be gathered right into a single occasion which is commonly required for reporting, analytics, or particular ad-hoc enterprise instances. On this submit, we’ll stroll by how failover is managed in such a setup when built-in in PXC/Galera based mostly setting.

For an preliminary understanding of the essential PXC replication supervisor setup, you possibly can discuss with the linked weblog submit

Let’s dive into the sensible use.

Topology:

Async Replication syncing movement:

  • DC1 [DC1-1] can have a multi-source replication channel and syncing from DC2[DC2-1] and DC3 [DC3-1] nodes.
  • DC2 [DC2-1] will likely be syncing from DC1 [DC-1].
  • DC3 [DC3-1] will likely be syncing from DC1[DC-1].

Async Multi-Supply topology

 

PXC/Async configurations

The configuration particulars as per every DC node is talked about within the Github file at location –  https://gist.github.com/aniljoshi2022/7714c97a9c755e3d12c60e3ead21a55f .

At this stage, all 3 clusters must be bootstrapped and in operating state.

  • Second and relaxation different Nodes:

We also needs to be certain that the replication person created on the DC1[mysql-DC1-1] node.

Replication Supervisor configuration

Now we are going to add configuration entries within the replication supervisor associated tables on DC-1 [DC1-1]. I’m not masking what every desk does right here,  as we already talked about within the first a part of the blogpost.

Asynchronous Replication Setup

  • Taking mysqldump from DC1 [DC1-1] node.
  • Transferring dump to DC2[DC2-1] and DC3[DC3-1].
  • Restoring dump on  DC2[DC2-1] and DC3[DC3-1].
  • Replication channel setup and beginning.

DC2-1

  DC3-1

  • Multo-Supply async replication setup on DC1[DC1-1]

Now, all of the clusters are linked as a supply to supply.

Replication Supervisor Cron Setup

We have to allow replication supervisor cron throughout all PXC/Async nodes.

For any error or points we will examine perception the – /tmp/replication_manager.log log file.

Testing Supply Failover For Multi-Supply Channel

DC1-1:

Now we are going to cease supply DC2 [DC2-1] .

 Under, we will see that connectionName with “DC1-DC2” is in a “Failed” state.

After a few minutes when the script once more begins monitoring, DC1 [DC1-1] is now linked with one other supply node of DC2 which is [DC2-2] .

Testing Duplicate Failover For Multi-Supply channel

We’ll cease DC1 (DC1-1) which is the present multi supply reproduction linked by way of each DC2 and DC3 nodes.

As soon as we cease the database service on DC1[DC1-1] and after ready for some time we will examine the standing once more and it’ll present as DC1[DC1-2] as a brand new multi-source reproduction.

Vital consideration:

The topology or state of affairs mentioned above is meant solely for demonstration functions and to watch how the PXC Replication Supervisor handles failover in complicated topologies. In a manufacturing setting, such architectures must be averted, as performing writes throughout each clusters (a number of nodes concurrently) can result in inconsistencies. For any related use instances, thorough and in-depth testing is strongly beneficial beforehand.

Abstract

The replication  supervisor script will be significantly helpful in complicated PXC/Galera topologies that require multi-source replication. This can ease the auto supply and reproduction failover to make sure all replication channels are wholesome and in sync. If sure nodes shouldn’t  be a part of a async/multi-source replication, we will disable the replication supervisor script there. Alternatively, node participation will be managed by adjusting the weights within the percona.weight desk, permitting replication habits to be managed extra exactly.

 

 

 

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles