Connection Pooling
The connections that are used for multiple client requests and server responses are called persistent connections. Once opened, these connections are cached in a connection pool. You set the properties that enable persistent connections, determine the maximum size of the connection pool, and control how long unused connections are maintained.
If you do not enable persistent connections, connections are closed as soon as the client receives the server response. CipherTrust Manager recommends enabling persistent connections. The performance cost of maintaining a pool is much less than the cost of opening a new connection for each request. To disable the persistent connection
How it 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 server.
The client checks if
Use_Persistent_Connections
is set toyes
.The client searches the connection pool for an existing connection.
The client uses an existing connection, if available. Else, it creates a new connection if there is space in the pool. If there is no space, the client returns an error.
The client uses the connection to communicate with the server.
When the operation is done, the connection stays in the pool and can be reused by the client. The pool closes connections that have been idle for the duration specified in the
Connection_Idle_Timeout
property.
Related Parameters
To use connection pooling, you need to set the following parameters in the properties file:
Use_Persistent_Connections
Size_of_Connection_Pool
Connection_Idle_Timeout
Refer to Connection Configuration Parameters to know more about the connection configuration related properties.