Manage connections

Caching Proxy spawns a new thread to handle each client request. If no threads are available, the proxy server holds requests until more threads become available. As the number of active threads increases, the proxy server consumes more memory. Specify the maximum number of active threads as the value for the MaxActiveThreads directive.

The listen backlog is the number of pending requests for client connections that the server logs before it refuses connections with new clients. Base this setting on the number of requests that the server can process in a few seconds. A server must respond to a client connection before it times out. Specify the maximum number of connections that can be held in the backlog as the value for the ListenBacklog directive.

The proxy server can maintain persistent client/server connections. With a persistent connection, the server accepts multiple requests from the client and sends responses over the same TCP/IP connection. Using persistent connections reduces latency for clients and lowers the CPU load on the proxy server, at the low cost of a small increase in server memory. Overall throughput is increased when the server does not establish a separate TCP/IP connection for each request and response, and the TCP/IP connection can be used with greatest efficiency when the connection is persistent.

Server-side connection pooling applies the benefits of persistent connections on the server side by allowing the reuse of existing connections between a proxy server and the origin servers. Each reused connection saves three TCP packets (two three-way handshake packets to set up the connection, and one to close it). The benefits of server-side connection pooling include:

Note:
Connection pooling is recommended only in a controlled environment. It can degrade performance where the origin servers are not HTTP 1.1 compliant. Note also that it is critical that the origin servers are set up properly. The following is a simple example from the Apache 1.3.19 configuration file: These settings keep connections to the Web servers open as long as they are being used and allow the proxy, rather than the origin server, to manage the connections. Therefore, the connections are pooled only to the extent needed.

When server-side connection pooling is enabled, HTTP connections to the origin servers are pooled. SSL connections are also pooled in configurations where the SSLEnable directive for the proxy is set to on.

Configure how connection pooling is maintained by specifying the maximum number of idle sockets to hold per server at any one time, how long the server waits before terminating an idle persistent connection, and the time interval at which the garbage collection thread checks for timed-out connections (the default is two minutes).

Define the amount of time that various connections remain open as values for the InputTimeout, OutputTimeout, PersistTimeout, ReadTimeout, and ScriptTimeout directives.

Associated directives

The following directives manage connections with the proxy server process:

For more information, refer to Manually editing the ibmproxy.conf file.

Configuration and Administration forms

The following Configuration and Administration forms edit the values of the associated directives:

Notes:
  1. You cannot use the Configuration and Administration forms to edit the ServerConnPool, MaxsocketPerServer, ServerConnTimeout, or ServerConnGCRun directives.
  2. The PersistTimeout can be edited from either the Server Configuration -> System Management -> Performance form or the Server Configuration -> System Management -> Timeouts form.

For more information, refer to Using the Configuration and Administration forms.