In this example, we create a bind DN server affinity provider for any client requesting write operations to have subsequent requests, whether read or write, forwarded to the same external server. The affinity period will last for 30 seconds after the last write request.

  1. Use the dsconfig tool to configure server affinity. Specify the host name, connection method, port number, and bind DN as described in previous procedures.
    $ bin/dsconfig
  2. In the Directory Proxy Server main menu, enter the number associated with server affinity provider configuration
  3. On the Server Affinity menu, enter the number corresponding to creating a new server affinity provider.
  4. Enter a name for your new server affinity provider.
    >>>> Enter a name for the Bind DN Server Affinity Provider 
    that you want to create: Affinity for Writing Applications   
  5. Indicate whether you want the server affinity provider to be enabled for use by the Directory Proxy Server. In this example, enter 1 to enable to the server affinity provider.
  6. Next, configure the properties of the server affinity provider. For example, you can customize the types of operations for which affinity may be set and the types of operations for which affinity may be used, as well as the length of time for which the affinity should persist. This example illustrates the properties of the bind DN server affinity provider.
    >>>> >>>> Configure the properties of the Bind DN Server Affinity Provider
    
            Property                  Value(s)
            ----------------------------------------------------------
        1)  description               -
        2)  enable                    true
        3)  affinity-duration         30 s     
        4)  set-affinity-operation    add, delete, modify, modify-dn
        5)  use-affinity-operation    add, bind, compare, delete, modify,
                                      modify-dn, search
    
        ?)  help
        f)  finish - create the new Bind DN Server Affinity Provider
        d)  display the equivalent dsconfig arguments to create this object
        b)  back
        q)  quit
    
    Enter choice [b]:
  7. Review the properties of the server affinity provider. If you are satisfied, enter f to finish. Once defined, the affinity provider can now be assigned to a load balancing algorithm.