Database (JDBC) and LDAP datastores use connection pooling to improve the performance and efficiency of communicating with external systems. Connection pools improve efficiency by maintaining persistent connections to the database or LDAP server thus preventing the expense of creating the connection on demand. Connection pools also allow more control over the load placed on the back-end server.

Much like the server thread pool, for optimal performance, a number of connections is required to handle most (if not all) the requests in parallel. It may not be necessary to have a connection available for every concurrent request received by the server but having too few available will cause requests to wait when accessing database and LDAP resources. For optimal performance, connection pools should be sized large enough to handle between 50% and 100% of the number of concurrent requests the server is expected to encounter most often.

Of course, it is also very important to understand the capacity and limitation of the database or LDAP server and to size the connection pool accordingly. Sizing the connection pool beyond the capability of the back-end server could lead to PingFederate flooding the datastore without any performance improvement.

  1. For JDBC datastores:
    1. On the System > Data Stores screen, select the applicable JDBC datastore.
    2. On the Database Config screen, click Advanced.
    3. On the Advanced Database Options screen:
      • Set the Minimum Pool Size value to 50% of the maxThreads value.
      • Set the Maximum Pool Size value to between 75% and 100% of the maxThreads value, subject to the capability of the back-end database server.
      Tip:

      The maxThreads value is defined in the <pf_install>/pingfederate/etc/jetty-runtime.xml file (see Tuning the server thread pool).

  2. For LDAP datastores:
    1. On the System > Data Stores screen, select the applicable LDAP datastore.
    2. On the LDAP Configuration screen, click Advanced.
    3. On the Advanced LDAP Options screen:
      • Set the Minimum Connections value to 50% of the maxThreads value.
      • Set the Maximum Connections value to between 75% and 100% of the maxThreads value, subject to the capability of the back-end database server.
      Tip:

      The maxThreads value is defined in the <pf_install>/pingfederate/etc/jetty-runtime.xml file (see Tuning the server thread pool).

      Note:

      As of PingFederate 7.2, separate connection pools are created for bind requests and search requests. This dramatically improves performance of LDAP authentications, especially when using LDAPS, because bind requests no longer require unique connections. Each connection pool (bind and search) is configured individually per the values set for minimum and maximum connections.

  3. For a clustered PingFederate environment, replicate the changes to all engine nodes on the System > Cluster Management screen.