OpenLDAP cluster on Linux

Source: Internet
Author: User
OpenLDAP cluster on application Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. Linux servers have the following features: low cost, excellent performance, and open code. More and more enterprises are preparing or adopting Linux to take on the important responsibilities of enterprise application servers. This article describes how to deploy a high-reliability LDAP authentication service in Linux and other open suites.

The software used by the system includes:

◆ Red Hat 7.2;

◆ OpenLDAP 2.1, www.openldap.org;

◆ Heartbeat 1.04, www.linux-ha.org.

Reasonable process to provide high reliability

OpenLDAP is used in the network application system of the system to provide unified identity authentication services for all applications, including querying other information such as mail routing, address, and contact information. As a special database, LDAP optimizes and processes read and query operations to ensure the query speed, therefore, it is particularly suitable for unified authentication services of enterprises, so as to standardize the same login identity and password of various business systems. Of course, its disadvantages are as obvious as its advantages. For example, it is not good at update and insert operations, but if it is used as a central authenticated database, you can use its strengths to circumvent its weaknesses.

Because the system uses LDAP as the Central Authentication database for all applications, once the LDAP server fails, all applications dependent on the database in the system network environment will be affected, or even stop providing corresponding services. To avoid this situation, we need to establish a high-reliability Authentication database cluster through two LDAP servers, and provide a unified database access network interface for other application systems. System network structure.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // www.51cto.com/files/uploadimg/20051219/1004040.jpg'); ">

System Network Structure


The entire system is divided into three layers: Application Server, database intermediate engine, and OpenLDAP database cluster. All application servers access 192.168.1.200 through the database intermediate engine (midd) and access the LDAP database through this unified database network interface. The system requires that the master server (192.168.1.100) be bound to 192.168.1.200 to provide services normally, and the slave server is in the STANDBY state. If the master fails, the slave can automatically take over the tasks, at the same time, the system administrator is notified through a certain communication method (such as email or SMS ).

Here, the midd database intermediate engine is a simple tool based on your needs. It can be used for the following purposes:

◆ Unify the interface for applications on the application server to access various databases. For example, you may replace the background LDAP database with other databases, such as Oracle. In this case, you only need to change the midd configuration file without making any changes to the application.

◆ Process pool is used to provide the application query speed. Midd can automatically adjust the number of processes in the process pool by loading access to the front-end applications. At the same time, each process in the process pool maintains a persistent connection with the LDAP database in the background. This avoids the resource waste and delay of opening a connection for each query under normal conditions.

◆ A midd is deployed on each application server. In this way, the application communicates with midd through the local IPC each request, avoiding the overhead of TCP connection.

◆ Application Mode of midd in active-active Mode of two LDAP databases. Midd can automatically differentiate read and write requests based on the startup parameters. It will allocate write requests to the Master LDAP database because the Slave LDAP database can only perform read operations. When the network load is large and two LDAP databases provide services at the same time, the midd mode is used, it can avoid the problem that the Slave LDAP database cannot change data and the two servers cannot maintain data synchronization.

According to the requirements of the above process, the system must solve two problems. First, because the two servers used as LDAP databases do not achieve storage sharing, therefore, the master and slave database servers must be synchronized in real time to ensure that the complete service can be provided once the slave takes over the task. Second, the master and slave must be able to detect the health status of the other Party in real time. Once the other party is found to be faulty, they can take over various tasks, including switching the virtual IP address and LDAP Service (changed to the master LDAP service, this means that it can perform write operations, so that the master server must first perform a data synchronization with slave after recovery ), and use rsh to run the midd startup mode (in active-active mode) on other remote application servers ).

The above two problems will be solved: Data Synchronization and task taking over.

Master and slave LDAP Server Data Synchronization

OpenLDAP provides a replication mechanism to ensure data synchronization between master and slave nodes on the network. The slurpd daemon implements this function. It regularly checks log files on the master server master and checks whether data on the master is updated. If there is an update, the updated data is transmitted to each slave server. Read (query) requests can be responded by any server in the LDAP Data Group, but write operations (update and insert) can only be performed on the master server, this is why the midd database intermediate engine must adopt different startup modes for read/write processing.

The following describes the configuration process of the master and slave LDAP servers. For the OpenLDAP installation process, you can view the installation documentation on the http://www.openldap.org, which is not described here. Install OpenLDAP on the two servers and configure the master and slave servers respectively.

1. The configuration file on the master LDAP Server (master) is as follows. This is a simple configuration example.

Configuration File Name: slapd. conf

File Content:
QUOTE:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.