Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

LDAP Administration Guide
Previous Page Home Next Page

16.5. MirrorMode

16.5.1. Arguments for MirrorMode

  • Provides a high-availability (HA) solution for directory writes (replicas handle reads)
  • As long as one Master is operational, writes can safely be excepted
  • Master nodes replicate from each other, so they are always up to date and can be ready to take over (hot standby)
  • Syncrepl also allows the master nodes to re-synchronize after any downtime
  • Delta-Syncrepl can be used

16.5.2. Arguments against MirrorMode

  • MirrorMode is not what is termed as a Multi-Master solution. This is because writes have to go to one of the mirror nodes at a time
  • MirrorMode can be termed as Active-Active Hot-Standby, therefor an external server (slapd in proxy mode) or device (hardware load balancer) to manage which master is currently active
  • While syncrepl can recover from a completely empty database, slapadd is much faster
  • Does not provide faster or more scalable write performance (neither could any Multi-Master solution)
  • Backups are managed slightly differently
    • If backing up the Berkeley database itself and periodically backing up the transaction log files, then the same member of the mirror pair needs to be used to collect logfiles until the next database backup is taken
    • To ensure that both databases are consistent, each database might have to be put in read-only mode while performing a slapcat.
    • When using slapcat, the generated LDIF files can be rather large. This can happen with a non-MirrorMode deployment also.

16.5.3. MirrorMode Configuration

MirrorMode configuration is actually very easy. If you have ever setup a normal slapd syncrepl provider, then the only change is the directive:

       mirrormode  on

You also need to make you the rid of each mirror node pair is different and that the provider syncrepl directive points to the other mirror pair.

16.5.3.1. Mirror Node Configuration

This is the same as the Set up the provider slapd section, referencing delta-syncrepl replication if using delta-syncrepl.

Here's a specific cut down example using LDAP Sync Replication in refreshAndPersist mode (delta-syncrepl can be used also):

MirrorMode node 1:

       # syncrepl directives
       syncrepl      rid=1
                     provider=ldap://ldap-rid2.example.com
                     bindmethod=simple
                     binddn="cn=mirrormode,dc=example,dc=com"
                     credentials=mirrormode
                     searchbase="dc=example,dc=com"
                     schemachecking=on
                     type=refreshAndPersist
                     retry="60 +"

       mirrormode on

MirrorMode node 2:

       # syncrepl directives
       syncrepl      rid=2
                     provider=ldap://ldap-rid1.example.com
                     bindmethod=simple
                     binddn="cn=mirrormode,dc=example,dc=com"
                     credentials=mirrormode
                     searchbase="dc=example,dc=com"
                     schemachecking=on
                     type=refreshAndPersist
                     retry="60 +"

       mirrormode on

It's simple really; each MirrorMode node is setup exactly the same, except that the provider directive is set to point to the other MirrorMode node.

16.5.3.2. Failover Configuration

There are generally 2 choices for this; 1. Hardware proxies/load-balancing or dedicated proxy software, 2. using a Back-LDAP proxy as a syncrepl provider

MORE HERE and a nice PICTURE

16.5.3.3. Normal Consumer Configuration

This is exactly the same as the Set up the consumer slapd section. It can either setup in normal syncrepl replication mode, or in delta-syncrepl replication mode.

16.5.4. MirrorMode Summary

Hopefully you will now have a directory architecture that provides all of the consistency guarantees of single-master replication, whilst also providing the high availability of multi-master replication.

________________
© Copyright 2007, OpenLDAP Foundation, [email protected]
LDAP Administration Guide
Previous Page Home Next Page

 
 
  Published under the terms of the OpenLDAP Public License Design by Interspire