Manage connections
Caching Proxy creates 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.
- Less network congestion (by minimizing the opening and closing of connections)
- Less CPU time that is used in routers, clients, and servers
- Less memory that is used on clients and servers
- On cache misses, quicker proxy response (by avoiding opening and closing connections)
-
#KeepAlive: Whether or not to allow persistent connections (more than one request per #connection). Set to Off to deactivate#
-
KeepAlive On
-
#MaxKeepAliveRequests: The maximum number of requests to allow during a persistent connection. Set to 0 to allow an unlimited amount. Leave this number high for maximum performance#
-
Max KeepAliveRequests 0
-
#KeepAliveTimeout: Number of seconds to wait for the next request from the same client on the same connection#
-
KeepAliveTimeout 240
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 2 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:
- MaxActiveThreads -- Specify the maximum number of active threads
- ConnThreads -- Specify the number of connection threads to be used for connection management
- ListenBacklog -- Specify the number of listen backlog client connections that the server can carry
- ProxyPersistence -- Allow persistent connections
- MaxPersistRequest -- Specify the maximum number of requests to receive on a persistent connection
- ServerConnPool -- Specify the pooling of connections to origin servers
- MaxSocketPerServer -- Specify the maximum open idle sockets for server
- ServerConnTimeout -- Specify maximum inactive period
- ServerConnGCRun -- Specify the interval at which to run garbage collection thread
- PersistTimeout -- Specify the time to wait for the client to send another request
- InputTimeout -- Specify the input timeout
- ReadTimeout -- Specify the time limit for a connection
- OutputTimeout -- Specify the output timeout
- ScriptTimeout - Specify the timeout setting for scripts
Configuration and Administration forms
The following Configuration and Administration forms edit the values of the associated directives:
- Server Configuration –> System Management –> Performance –> Maximum number of active threads
- Server Configuration –> System Management –> Performance –> Size of listen backlog
- Proxy Configuration –> Proxy Performance –> Allow persistent connections
- Server Configuration –> System Management –> Performance –> Maximum Requests
- Server Configuration –> System Management –> Performance –> Persist timeout
- Server Configuration –> System Management –> Timeouts –> Input timeout
- Server Configuration –> System Management –> Timeouts –> Read timeout
- Server Configuration –> System Management –> Timeouts –> Output timeout
- Server Configuration –> System Management –> Timeouts –> Script timeout
- Server Configuration –> System Management –> Timeouts –> Persist timeout
- You cannot use the Configuration and Administration forms to edit the
ServerConnPool
,MaxsocketPerServer
,ServerConnTimeout
, orServerConnGCRun
directives. - The
PersistTimeout
can be edited from either the Server Configuration –> System Management –> Performance form or the Server Configuration –> System Management –> Timeouts form.