Connection pooling can provide performance benefits for CICS applications that use client HTTP connections in the following scenarios: Multiple CICS web support applications, either invocations of the same application or different applications, make HTTP client requests to the same host and port.
If the server supports persistent connections, HTTP connection pooling can provide performance benefits when multiple HTTP requests target the same host and port. With connection pooling, instead of closing the client HTTP connection after use the connection is kept open and returned for reuse.
Go to Monitoring and Tuning > Performance Viewer > Current activity , select server, then in PMI viewer select Settings > Log to define logging period and format. And in Modules > Thread pools > WebContainer you can view current counter values. This is rather for short term monitoring, than for constant logging.
The default size of the pool of concurrent connections that can be open by the manager is two for each route or target host and 20 for total open connections.
I have spent recent days working on this so just want to share some "everyone-known" knowledges with you.
First, as you are dealing with the same server, it is recommended to use a single HTTP client to execute your requests. With the help of PoolingHttpClientConnectionManager
, your client can be used to execute multiple requests concurrently. The official example of multithreaded request execution can be found here.
Secondly, HTTP/1.1 (and enhanced versions of HTTP/1.0) allows HTTP clients to keep the connections open after transactions complete so that it can be reused for future requests. This is often refered as Persistent Connection.
Also for the purpose of reusing client for multiple requests, the response header from a server often include an attribute call Keep-Alive
that contain the time current connection will be kept alive. Besides that, Apache Http Client also provides you an interface ConnectionKeepAliveStrategy
to customize your own policy for reusing connection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With