I’m mostly done with the series of post concerning the new features of the latest release of OpenDS, the opensource LDAPv3 directory service. Yesterday, Mathieu, the developer behind Assured Replication, reminded me of a small but important new feature of OpenDS, in the area of replication: the ability to configure Replication Groups.
A replication group is a simple way to relate replicated OpenDS directory servers together. It’s useful when there are more than 2 replicated servers, when the replicated servers are within different data-centers or to distinguished primary servers from secondary servers.
Replications groups are identified by a group ID which is a unique number assigned to a replication domain on a directory server and to replication servers. Group IDs determine how a directory server domain connects to an available replication server. From the list of configured replication servers, a directory server first tries to connect to a replication server that has the same group ID as that of the directory server. If no replication server with a compatible group ID is available, the directory server connects to a replication server with a different group ID.
In practice, it allows to prioritize how the replication traffic is done between the servers. In the case of multiple data-centers, it’s preferable that all directory servers in a data-center are connected to replication servers in the same data-center. Only in the case of absence of a local replication server, a directory server will connect to a remote replication server.
Note that when configuring replication with OpenDS 2.0 and the dsreplication utility, both the replication server and the directory server are configured in the same process and thus the same host. It will be very rare if the replication server is not working for its directory server.
The figure below is an illustration of 2 Replication Groups, one for each data center.
Now to configure a replication group ?
A replication group is configured on each directory server and replication server that should be part of the same group.
On the directory server, the replication group is configured per replication domain (i.e. per replicated suffix).
First identify the replication domain
$ bin/dsconfig -D “cn=directory manager” -j /tmp/passwdfile -n -s list-replication-domains –provider-name “Multimaster Synchronization”
cn=admin data (domain 29167)
cn=schema (domain 9674)
dc=example,dc=com (domain 14741)
Then set the group ID for the domain
$ bin/dsconfig -D “cn=directory manager” -j /tmp/passwdfile -n set-replication-domain-prop –provider-name “Multimaster Synchronization” –domain-name “dc=example,dc=com (domain 14741)” –advanced –set group-id:5
For the replication server
$ bin/dsconfig -D “cn=directory manager” -j /tmp/passwdfile -n set-replication-server-prop –provider-name “Multimaster Synchronization” –advanced –set group-id:5
Repeat this to the other directory servers and replication servers that should be part of the same group.
Note that there is a group by default with the group ID 1.
Configuring replication groups have some impact when using Assured Replication, since Assured Replication only works within a single group. So groups can be used to limit the impact of network latency when using Assured Replication, or to constrain the changes to be more consistent in a single data-center.
You can find more information about replication groups in the Replication Architecture reference manual and in the Replication section of the Administration Guide.
Technorati Tags: directory-server, java, ldap, opends, opensource, replication
[Trackback] Read their highlights, complete with configuration steps and other nuances, thanks to Ludo Poitou.