Sun Java System Directory Server Enterprise Edition 6.0 管理指南

Procedure配置飽和演算法以進行負載平衡

如需飽和演算法的說明,請參閱「Sun Java System Directory Server Enterprise Edition 6.0 Reference」中的「Saturation Algorithm for Load Balancing」

在此範例中,資料來源 ds-1 執行大部分連結作業,但不執行任何其他類型的作業。以下列加權配置三個資料來源:

您可以使用 DSCC 執行此作業。如需有關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。

開始之前

確保資料來源池至少有三個附加資料來源。如需有關如何建立資料來源與資料來源池的資訊,請參閱第 20 章, LDAP 資料來源與資料來源池

  1. 將資料來源池配置為使用飽和演算法進行負載平衡。


    $ dpconf set-ldap-data-source-pool-prop -h host -p port pool-name \
     load-balancing-algorithm:saturation
  2. 配置第一個資料來源的特性。


    $ dpconf set-attached-ldap-data-source-prop -h host -p port pool-name ds-1 \
     add-weight:disabled bind-weight:3 compare-weight:disabled delete-weight:disabled \
     modify-dn-weight:disabled modify-weight:disabled search-weight:disabled
  3. 配置第二個資料來源的特性。


    $ 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. 配置第三個資料來源的特性。


    $ 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. 比較附加資料來源的主要參數。


    $ dpconf list-attached-ldap-data-sources -h host -p port -v pool-name
    Name add-weight bind-weight compare-weight delete-weight modify-dn-weight modify-weight search-weight
    ---  ---------- ----------- -------------- ------------- ---------------- ------------- -------------
    ds-1 disabled   3		       disabled       disabled      disabled         disabled      disabled
    ds-2 2          2           2              2             2                2             2
    ds-3 1          1           1              1             1                1             1
  6. 重新啟動目錄代理伺服器實例。


    $ dpadm restart instance-path