Menu

FailoverServerSet - Setting connection size for individual servers

RPC
2014-05-21
2014-05-21
  • RPC

    RPC - 2014-05-21

    Hi Neil,

    If we configured FailoverServerSet wtih 3 servers(Primary, Secondary & Tertiary server). While creating the ConnectionPool, we have the option to provide the attributes like FailoverServerSet, BindRequest, Minimum Size & Maximum size.
    But the minimum & maximum size configured in the pool is same for all the 3 servers.

    My Question is

    1.Is't possible to set the minimum & maximum value separately for all the 3 servers (i.e.) I need to configure maximum connection value 10 for primary server, 5 for secondary server, 3 for tertiary server.

    2.If the primary server is down, then the FailoverServerSet will automatically switch to secondary Server, same way for Secondary Server. We don't have the knowledge about the switching of servers. Do we have any tracking mechanism in UnboundId to get track of how many fail overs happen on which server?

    3.In the connection pool, it will internally use the connections for all the transactions. If user wants to get the average time per transaction, is't possible to retrieve this?

    Kindly share your ideas to achieve this.

     
  • Neil Wilson

    Neil Wilson - 2014-05-21

    The first question doesn't really make sense because of the way that the connection pool works. The connection pool doesn't maintain simultaneous connections to all of the servers. Instead, it only uses the configured server set to establish new connections whenever it needs them (e.g., because a client asked for a connection but there are none available, or because the LDAP SDK detected that a connection is no longer valid and needs to replace it). So when you create a connection pool using a failover server set, if the primary server is online then all of the initial connections will be created to that server, and all subsequent connections will go to that server unless it's not available at the time of a connection attempt.

    There also isn't currently a way to determine how many failed attempts there were to establish a connection to each server in the set. The LDAPConnectionPoolStatistics class offers information about the number of failed connection attempts for the pool, but that is only incremented when the server set fails to establish a connection to any server. However, I can definitely look into updating the server sets to provide statistics about the number of successful and failed connection attempts.

    And the LDAPConnectionPoolStatistics doesn't currently track response times for operations processed within the pool. It wouldn't really be possible for operations processed on connections that the caller has checked out of the pool, but the pool could track that for operations invoked using methods that the connection pool offers for performing operations. I'll look into making this change as well.

     

Log in to post a comment.