Sun Directory Server Enterprise Edition 7.0 Administration Guide

ProcedureTo Configure the Failover Algorithm for Load Balancing

For a description of the failover algorithm, see Failover Algorithm for Load Balancing in Sun Directory Server Enterprise Edition 7.0 Reference.

This example has three data sources. The data source ds-1 receives all requests. If ds-1 fails, ds-2 receives all requests until ds-1 recovers. If ds-2 fails before ds-1 recovers, ds-3 receives all requests.

You can use DSCC to perform this task. For information, see Directory Service Control Center Interface and the DSCC online help.

Before You Begin

Ensure that you have a data source pool with at least three attached data sources. For information about how to create data sources and data source pools, see Creating LDAP Data Views.

  1. Configure the data source pool to use the failover algorithm for load balancing.


    $ dpconf set-ldap-data-source-pool-prop -h host -p port pool-name \
     load-balancing-algorithm:failover
  2. Configure the properties of the first data source.


    $ dpconf set-attached-ldap-data-source-prop -h host -p port pool-name ds-1 \
     add-weight:3 bind-weight:3 compare-weight:3 delete-weight:3 modify-dn-weight:3 \
     modify-weight:3 search-weight:3
  3. Configure the properties of the second data source.


    $ dpconf set-attached-ldap-data-source-prop -h host -p port pool-name ds-2 \
     add-weight:2 bind-weight:2 compare-weight:2 delete-weight:2 modify-dn-weight:2 \
     modify-weight:2 search-weight:2
  4. Configure the properties of the third data source.


    $ dpconf set-attached-ldap-data-source-prop -h host -p port pool-name ds-3 \
     add-weight:1 bind-weight:1 compare-weight:1 delete-weight:1 modify-dn-weight:1 \
     modify-weight:1 search-weight:1
  5. Compare the key parameters of the attached data sources.


    $ dpconf list-attached-ldap-data-sources -h host -p port -v pool-name
    SRC_NAME add-weight bind-weight compare-weight delete-weight 
    -------- ---------- ----------- -------------- ------------- 
    ds-1     3          3           3              3             
    ds-2     2          2           2              2             
    ds-3     1          1           1              1             
    
    modify-dn-weight modify-weight search-weight
    ---------------- ------------- -------------
    3                3             3
    2                2             2
    1                1             1
  6. Restart the instance of Directory Proxy Server.


    $ dpadm restart instance-path