Sun Directory Server Enterprise Edition 7.0 Administration Guide

ProcedureTo Configure Weights for Load Balancing

You need to configure the weights of an attached data source in relation to the weights of any other attached data sources in the data source pool. Consider the weights of all of your attached data sources. If a data source has a weight of disabled for a type of operation, requests of that type are never sent to that data source. If a data source has a weight of 0 (zero), no requests are distributed to that data source.

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

  1. View the list of data sources that are attached to the data source pool.


    $ dpconf list-attached-ldap-data-sources -h host -p port pool-name
    
  2. View the properties of one of the attached data sources.


    $ dpconf get-attached-ldap-data-source-prop pool-name \
     attached-data-source-name
    

    The properties of an attached data source define the weight for each type of operation. The default weights of an attached data source are as follows:


    add-weight        :  disabled  
    bind-weight       :  disabled  
    compare-weight    :  disabled  
    delete-weight     :  disabled  
    modify-dn-weight  :  disabled  
    modify-weight     :  disabled  
    search-weight     :  disabled 
  3. Configure the weights of one of the attached data sources.


    $ dpconf set-attached-ldap-data-source-prop -h host -p port pool-name \
     attached-data-source-name add-weight:value \
     bind-weight:value compare-weight:value delete-weight:value \
     modify-dn-weight:value modify-weight:value search-weight:value
    
  4. Repeat Step 2 and Step 3 for the other attached data sources.

  5. Compare the key parameters of the attached data sources.


    $ dpconf list-attached-ldap-data-sources -h host -p port -v pool-name
    

    For example, a data source pool can contain data sources with the following weights:


    $ dpconf list-attached-ldap-data-sources -h host1 -p 1389 -v myPool
    SRC_NAME add-weight bind-weight compare-weight delete-weight 
    -------- ---------- ----------- -------------- ------------- 
    DS-1     disabled   3		       disabled       disabled      
    DS-2     2          2           2              2             
    DS-3     1          1           1              1             
    
    modify-dn-weight modify-weight search-weight
    ---------------- ------------- -------------
    disabled         disabled      disabled
    2                2             2
    1                1             1