Red Hat Training

A Red Hat training course is available for Red Hat Directory Server

15.3. Replication Scenarios

These basic strategies can be combined in a variety of ways to create the best replication environment.


Whatever replication scenario is implemented, consider schema replication. To avoid conflict resolution loops, the Referential Integrity Plug-in should only be enabled on one supplier replica in a multi-master replication environment. The plug-in is off by default.

15.3.1. Single-Master Replication

In the simplest replication scenario, the master copy of directory data is held in a single read-write replica on one server called the supplier server. The supplier server also maintains changelog for this replica. On another server, called the consumer server, there can be multiple read-only replicas. Such scenarios are called single-master configurations. Figure 15.1, “Single-Master Replication” shows an example of single-master replication.
Single-Master Replication

Figure 15.1. Single-Master Replication

In this particular configuration, the ou=people,dc=example,dc=com suffix receives a large number of search requests. Therefore, to distribute the load, this tree, which is mastered on Server A, is replicated to two read-only replicas located on Server B and Server C.
For information on setting up a single-master replication environment, see Section 15.5, “Configuring Single-Master Replication”.

15.3.2. Multi-Master Replication

Directory Server also supports complex replication scenarios in which the same suffix (database) can be mastered on many servers. This suffix is held in a read-write replica on each server. This means that each server maintains a changelog for the read-write replica.
Multi-master replication in Directory Server supports as many as 20 masters, an unlimited number of hub suppliers, and an unlimited number of consumer servers. Each consumer server holds a read-only replica. The consumers can receive updates from any or all the suppliers. The consumers also have referrals defined for all the suppliers to forward any update requests that the consumers receive. Such scenarios are called multi-master configurations.
Figure 15.2, “Multi-Master Replication (Two Masters)” shows an example of multi-master replication scenario with two supplier servers and two consumer servers.
Multi-Master Replication (Two Masters)

Figure 15.2. Multi-Master Replication (Two Masters)

Figure 15.3, “Multi-Master Replication (Four Masters)” shows a sample of multi-master replication scenario with four supplier servers and eight consumer servers. In this sample setup, each supplier server is configured with ten replication agreements to feed data to two other supplier servers and all eight consumer servers. (The Directory Server can have as many as 20 masters in a multi-master setup.)
Multi-Master Replication (Four Masters)

Figure 15.3. Multi-Master Replication (Four Masters)

Multi-master configurations have the following advantages:
  • Automatic write failover when one supplier is inaccessible.
  • Updates are made on a local supplier in a geographically distributed environment.


The speed that replication proceeds depends on:
  • The speed of the network.
  • The number of outgoing and incoming replication agreements. Set up maximum 8 outbound and 4 inbound replication agreements for best performance.
For the procedure to set up multi-master replication, see Section 15.6, “Configuring Multi-Master Replication”.

15.3.3. Cascading Replication

In a cascading replication scenario, one server, a hub, acts both as a consumer and a supplier. It holds a read-only replica and maintains a changelog, so it receives updates from the supplier server that holds the master copy of the data and, in turn, supplies those updates to the consumer. Cascading replication is very useful for balancing heavy traffic loads or to keep master servers based locally in geographically-distributed environments.
Figure 15.4, “Cascading Replication” shows an example of a simple cascading replication scenario, though it is possible to create more complex scenarios with several hub servers.
Cascading Replication

Figure 15.4. Cascading Replication

For information on setting up cascading replication, see Section 15.7, “Configuring Cascading Replication”.


Multi-master and cascading replication can be combined. For example, in the multi-master scenario illustrated in Figure 15.2, “Multi-Master Replication (Two Masters)”, Server C and Server D could be hub servers that would replicate to any number of consumer servers.