| United States-English |
|
|
|
![]() |
HP Open Source Middleware Stacks Blueprint:: Directory Services on HP ProLiant Servers with SUSE Linux Enterprise Server 10Configuring the Master-Slave Replication |
|
Symas CDS replication is used to address high availability and performance requirements. Although the CDS server is optimal for handling querying operations, with the help of replication, the CDS server can also provide performance improvement, reduce query latency by locating replicas “close” to clients, and assist with lowering the risk of a single point of failure. In most cases, the optimal, scalable solution is the master-slave replication configuration, in which one master manages all directory update operations and the slave servers handle all directory query operations. This configuration is supported natively by OpenLDAP, and therefore, CDS. Additional slave servers can be added with limited effort after the CDS server is configured and running. The CDS server supports two mechanisms for the master-slave replication: first, a typical implementation by slurpd daemon and second, a new method from OpenLDAP version 2.2 called content-synchronization or “syncrepl”. This document focuses on the new syncrepl method. For more information about the two replication methods, visit the Web site at: http://www.openldap.org/faq/data/cache/1170.html The syncrepl method uses the LDAP content synchronization protocol as the synchronization protocol to maintain a Directory Information Tree (DIT) fragment copy of the master CDS server. The syncrepl engine is a slave-side replication engine, which supports both polling and listening modes of synchronization. If the refreshOnly mode is used, the syncrepl engine is triggered periodically and checks whether to perform synchronization operations. If the refreshAndPersist mode is used, the engine is always ready to handle persistent synchronization messages from the master server. The syncrepl method uses a slave-side replication engine. To set up a syncrepl replication in refreshOnly mode, enable the syncrepl engine on the CDS slave server. Additionally, enable the syncprov overlay feature on the CDS master server. The following example provides the detailed steps required to set up a syncrepl replication for contents under binddn ‘dc=example, dc=com’ in refreshOnly mode:
There is no formal tool to monitor the syncrepl replication status. However, there are two methods you can use to verify that the replication is complete.
Start the slave-side slapd process with debugging enabled, for this example set the debug level to 'syncrepl consumer processing ' (level 16384), by entering the following command: # /etc/init.d/cdssserver start –d 16384 Once a replication occurs, the message do_syncrep2: displays. If a replication finishes, the following messages display: syncrepl_entry: 'dn_of_the_last_entry' syncrepl_entry: be_add(0)
List the contextCSN by entering the following commands: For the following commands: # ldapsearch –x –D dc=example,dc=com –w secret –H \ ldap://slave_side_IP –b dc=example,dc=com –s base contextCSN # ldapsearch –x –D dc=example,dc=com –w secret –H \ ldap://master_side_IP –b dc=example,dc=com –s base contextCSN Compare the contextCSN tags. If they are the same, the replication is finished, otherwise the replication is not finished.
Replication can scale out CDS with the help of a load balancer, such as the Linux Virtual Server (LVS). LVS defines the network packet stream that goes through a certain network port as a service. It simply intercepts these packets and distributes them to different servers. For the installation and configuration of LVS, see the LVS documentation at: http://www.linuxvirtualserver.org/Documents.html Figure 1illustrates a typical CDS scale-out configuration. In this case, the LDAP clients send query requirements through the client network to the application server, and then LVS receives the read requests and sends them to the CDS slaves with the “round robin” assigned policy. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||