Load Balancer 1 (lb1.idp-example.com) is configured in front of the Directory Server instances on the identity provider side. This section assumes that you have already installed the load balancer. Before beginning, note the following:
The load balancer hardware and software used in the lab facility for this deployment is BIG-IP® manufactured by F5 Networks. If you are using different load balancer software, see the documentation that comes with that product for detailed settings information.
Contact your network administrator to obtain an available virtual IP address for the load balancer you want to configure.
Know the IP address of the load balancer hardware, the URL for the load balancer login page, and a username and password for logging in to the load balancer application.
Get the IP addresses for Directory Server 1 and Directory Server 2 by running the following command on each host machine:
# ifconfig -a |
Use the following list of procedures as a checklist for completing the task.
Import the CA root certificate to the Directory Server Load Balancer 1 to ensure that a link between Load Balancer 1 can be maintained with the CA.
Use the same root certificate that you imported in 4.4 Enabling Secure Communication for the Directory Server User Data Instances. For more information, see 3.3 Obtaining Secure Socket Layer Certificates.
Access https://lb1.idp-example.com, the BIG-IP load balancer login page, in a web browser.
Log in to the load balancer as administrator.
Click Proxies.
Click the Cert-Admin tab.
Click Import.
In the Import Type field, choose Certificate and click Continue.
Click Browse in the Certificate File field on the Install SSL Certificate page.
Choose Browser in the Choose File dialog box.
Navigate to ca.cer and click Open.
Enter OpenSSL_CA_cert in the Certificate Identifier field.
Click Install Certificate.
The CertificateOpenSSL_CA_Cert page is displayed.
Click Return to Certificate Administration on the CertificateOpenSSL_CA_Cert page.
OpenSSL_CA_Cert, the root certificate, is now included in the Certificate ID list.
This procedure assumes that you have just completed To Import the Root Certificate to Directory Server Load Balancer 1 and are still logged into the load balancer console.
Click Configure your BIG-IP (R) using the Configuration Utility.
Create a Pool.
A pool contains all the backend server instances.
In the left pane, click Pools.
On the Pools tab, click Add.
In the Add Pool dialog, provide the following information:
DirectoryServerIDP-UserData-Pool
Round Robin
Add the IP address and port number of both Directory Server host machines.
User port number 1736.
Click Done.
Add a Virtual Server.
The virtual server presents an address to the outside world and, when users attempt to connect, it would forward the connection to the most appropriate real server.
If you encounter JavaScriptTM errors or otherwise cannot proceed to create a virtual server, try using Internet Explorer.
In the left frame, click Virtual Servers.
Click Add on the Virtual Servers tab.
In the Add a Virtual Server dialog box, provide the following information:
Enter the IP address for lb1.idp-example.com.
489
Continue to click Next until you reach the Pool Selection dialog box.
Assign DirectoryServerIDP-UserData-Pool to the virtual server in the Pool Selection dialog box.
Click Done.
Add Monitors
Monitors are required for the load balancer to detect the backend server failures.
In the left frame, click Monitors.
Click the Basic Associations tab.
Add an LDAP monitor for the Directory Server 1 node.
In the Node column, locate the IP address and port number previously entered for Directory Server 1 and select the Add checkbox.
Add an LDAP monitor for the Directory Server 2 node.
In the Node column, locate the IP address and port number previously entered for Directory Server 2 and select the Add checkbox.
At the top of the Node column, in the drop-down list, choose tcp.
Click Apply.
Configure the load balancer for simple persistence.
With simple persistence, all requests sent within a specified interval are processed by the same Directory Server instance, ensuring complete replication of entries. For example, when a request requires information to be written to Directory Server 1, that information must also be replicated to Directory Server 2. As the replication takes time to complete, if a related request is directed by the load balancer to Directory Server 2 during the replication process itself, the request may fail as the entry might only be partially created. When properly configured, simple persistence ensures that both requests are routed to Directory Server 1 and processed in consecutive order; the first request is finished before the second request begins processing. Simple persistence ensures that within the specified interval, no errors or delays occur due to replication time or redirects when retrieving data. Simple persistence tracks connections based only on the client IP address.
Verify the load balancer configuration with the following sub procedure.
Log in as a root user on each Directory Server host machine.
On each host machine, use the tail command to monitor the Directory Server access log.
# cd /var/opt/mps/idp-users/logs # tail -f access |
You should see connections to the load balancer IP address opening and closing. For example:
[12/July/2008:13:10:20-0700] conn=69755 op=-1 msgId=-1 - closed [12/July/2008:13:10:25-0700] conn=69756 op=-1 msgId=-1 - fd=27 slot=27 LDAP connection from IP_address to IP_address [12/July/2008:13:10:25-0700] conn=69756 op=0 msgId=0 - RESULT err=80 tag=120 nentries=0 etime=0 [12/July/2008:13:10:25-0700] conn=69756 op=-1 msgId=-1 - closing from IP_address
Execute the following LDAP search against the Directory Server load balancer from Directory Server 1.
# cd /var/opt/mps/serverroot/dsrk6/bin # ./ldapsearch -h lb1.idp-example.com -p 489 -Z -P /var/opt/mps/idp-users/alias/slapd-cert8.db -b "dc=company,dc=com" -D "cn=directory manager" -w dsmanager "(objectclass=*)" version: 1 dn: dc=company,dc=com dc: company objectClass: top objectClass: domain |
Make sure the returned entries display in the access log on only one Directory Server host machine.
Run dsadm stop to stop Directory Server 1.
# cd /var/opt/mps/serverroot/ds6/bin # ./dsadm stop /var/opt/mps/idp-users |
Perform the (same) LDAP search against the Directory Server load balancer from Directory Server 2.
# cd /var/opt/mps/serverroot/dsrk6/bin # ./ldapsearch -h lb1.idp-example.com -p 489 -Z -P /var/opt/mps/idp-users/alias/slapd-cert8.db -b "dc=company,dc=com" -D "cn=directory manager" -w dsmanager "(objectclass=*)" version: 1 dn: dc=company,dc=com dc: company objectClass: top objectClass: domain |
Make sure that the returned entries display in the access log on only Directory Server 2.
You may encounter the following error message:
ldap_simple_bind: Cant' connect to the LDAP server — Connection refused
This means that the load balancer may not fully detect that Directory Server 1 is stopped. In this case, you may have started the search too soon based on the polling interval setting. For example, if the polling interval is set to 10 seconds, you should wait ten seconds to start the search. You can reset the timeout properties to a lower value using the load balancer console.
Click the Monitors tab.
Click the tcp monitor name.
In the Interval field, set the value to 5.
This tells the load balancer to poll the server every 5 seconds.
In the Timeout field, set the value to 16.
Click Apply and repeat the LDAP search.
See your load balancer documentation for more information on the timeout property.
Start Directory Server 1.
# ./dsadm start /var/opt/mps/idp-users |
Stop Directory Server 2.
# cd /var/opt/mps/serverroot/ds6/bin # ./dsadm stop /var/opt/mps/idp-users |
Perform the following LDAP search against the Directory Server load balancer from Directory Server 1.
# cd /var/opt/mps/serverroot/dsrk6/bin ./ldapsearch -h lb1.idp-example.com -p 489 -Z -P /var/opt/mps/idp-users/alias/slapd-cert8.db -b "dc=company,dc=com" -D "cn=directory manager" -w dsmanager "(objectclass=*)" version: 1 dn: dc=company,dc=com dc: company objectClass: top objectClass: domain |
Make sure the returned entries display in the access log on only Directory Server 1.
Start Directory Server 2.
# ./dsadm start /var/opt/mps/idp-users |
Log out of both Directory Server host machines and the load balancer console.