Connection Pooling
Persistent connections are connections that are used for multiple client requests and server responses. Once opened, persistent connections are cached in a connection pool. It is recommended to enable persistent connections. If not enabled, connections are closed as soon as the client receives the server response.
Set the properties that:
Enable persistent connections.
Determine the maximum size of the connection pool.
Control how long unused connections are maintained.
How Connection Pooling Works
The following steps describe what happens when the feature is enabled and the client attempts to connect to the server:
Your application calls for a connection to the Key Manager.
The client checks whether the
Use_Persistent_Connections
is set toyes
.The client searches the connection pool for an existing connection.
If connection is available, the client uses an existing connection. Else, it creates a new connection if there is space in the pool.
The client uses the connection to communicate with the server.
When the operation is complete, the connection stays in the pool and can be reused by the client. The connection pool will close any connections that have been idle for the length of the
Connection_Idle_Timeout
.Note
No more than 300 connections can exist at one time. The size of the pool actually starts at 0 and can scale to 300 as needed. Unused connections are closed according to the
Connection_Idle_Timeout
, and the connection pool shrinks when fewer connections are needed. If a connection is not being used, it will be closed after 10 minutes.
Related Parameters
Use_Persistent_Connections | Size_of_Connection_Pool | Connection_Idle_Timeout |
Refer to Connection Configuration Parameters for details about the connection configuration related parameters.