Multi-Master Parallel Replication v6.2

For a multi-master replication system, transactions can be replicated from one primary node to another by one of the synchronization methods described in the previous sections – either the trigger-based method (see Synchronization Replication with the Trigger-Based Method) or the log-based method (see Synchronization Replication with the Log-Based Method).

For a single replication event to be considered finished and complete, transactions that have occurred on all primary nodes since the previous replication event must be successfully replicated to all other primary nodes by the configured synchronization method.

This consists of a series of multiple replication sets, each identified by a primary node acting as the source primary node, which contains the transactions that needs to be replicated to all other primary nodes acting as the target primary nodes. So for a multi-master replication system consisting of n number of primary nodes, there will be n such replication sets – each with a different primary node acting as the source.

Since the initial support of multi-master replication systems in xDB Replication Server version 5.0, such a series of multiple replication sets were always initiated in a strictly serial manner. That is, the transaction replication from a source primary node to all target primary nodes must be completed before the start of the transaction replication from the next primary node to all other target primary nodes, and so on.

For example, consider a 3-primary node system consisting of primary node A, primary node B, and primary node C.

If applications have applied transactions to tables in all three primary nodes and then a synchronization replication event is initiated either on demand by the xDB Replication Console, an xDB Replication Server CLI command, or by a scheduled replication, the transactions are replicated in the following manner:

  1. Transactions that were made on primary node A are replicated to primary node B and primary node C.
  2. When Step 1 has been completed, transactions that were made on primary node B are replicated to primary node A and primary node C.
  3. When Step 2 has been completed, transactions that were made on primary node C are replicated to primary node A and primary node B.

The time to complete the entire replication event, referred to as the latency time, is basically the sum of the replication times where each primary node acts as the source (that is, the sum of the times for steps 1, 2, and 3).

For the log-based method, this latency time has been reduced by the implementation of parallel replication whereby each replication set from a given primary node acting as the source, executes and runs simultaneously with all other replication sets where the other primary nodes act as the source.

Thus, a replication set from a primary node is not waiting for others to complete before it can start so steps 1, 2, and 3 all run simultaneously instead of one after the other.

Note

The parallel replication applies only to the log-based method and not for the trigger-based method.

There is no required configuration setting to enable the use of parallel replication for the log-based MMR system.

Note

In addition to parallel replication, optimization of replicating from a given primary node to all other primary nodes (that is, within the context of a single replication set) has been implemented with the use of multiple threads. This is referred to as parallel synchronization. Parallel synchronization applies to both the trigger-based and log-based methods. See Parallel Synchronization for information on parallel synchronization.