Performance Directives

See also the Sandbox directives for other performance related directives.

KeepAlive

Description Enable HTTP Keep-Alive to serve multiple requests within a single TCP/IP connection
Synopsis
KeepAlive [on | off]
Context Default Server, Virtual Host
Example
KeepAlive on
The KeepAlive directive enables the HTTP Keep-Alive facility where a single TCP/IP connection may be reused for multiple requests. They can significantly speed up overall performance particularly over longer connections where the TCP/IP connection setup time is long.

Keep-Alive is supported by AppWeb with both HTTP/1.0 and HTTP/1.1 protocols. With HTTP/1.1, Keep-Alive is the default. With HTTP/1.0, clients may optionally request Keep-Alive.

Connections can only be reused if the length of the content returned to the client is know ahead in advance to that a Content-Length header can be correctly formatted. This means that very large CGI, ESP or EGI output may cause a TCP/IP connection to be closed and the effectiveness of Keep-Alive to be limited.

KeepAliveTimeout

Description Set the time period to hold a TCP/IP connection open for further requests when using Keep-Alive.
Synopsis
KeepAliveTimeout seconds
Context Default Server, Virtual Host
Example
KeepAliveTimeout 120
The KeepAliveTimeout directive defines the time period to keep connections open waiting for further requests from a given client. If further requests arrive, the timeout period is restarted.

Setting the timeout period too high may impact performance on high-traffic servers because of the large number of open TCP/IP connections.

MaxKeepAliveRequests

Description Define the maximum number of requests for a connection.
Synopsis
MaxKeepAliveRequests number
Context Default Server, Virtual Host
Example
MaxKeepAliveRequests 50
The MaxKeepAliveRequests directive defines the maximum number of requests that may possibly be services using a single TCP/IP connect. Limiting the number to a reasonable maximum can help reduce the impact of some denial of service attacks.

SendBufferSize

Description Set the TCP/IP buffer size.
Synopsis
SendBufferSize limit
Context Default Server
Example
SendBufferSize 8192
The SendBufferSize directive sets the TCP/IP buffer size. Increasing the SendBufferSize can improve throughput and lower CPU usage. You should only need to do this if you have very high data rates.

The limit may be set to 0 to use the O/S default value.

SessionTimeout

Description Set an inactivity time period before disposing of a session data store
Synopsis
SessionTimeout seconds
Context Default Server, VirtualHost
Example
SessionTimeout 1800
The SessionTimeout directive defines the number of seconds of inactivity to wait before disposing a session data store. Embedded Server Pages (ESP) will create session data stores to store user's state data. If the user abandons their session, the session will be cleaned up when this timeout expires. It is good practice for ESP pages to explicitly dispose of sessions when a user completes a transaction or logs off.

Timeout

Description Set the time period to wait before cancelling the request
Synopsis
Timeout seconds
Context Default Server, Virtual Host
Example
Timeout 600
The Timeout directive defines the number of seconds of I/O inactivity to wait before cancelling a client request. This timeout is necessary to cleanup idle connections.

Some web user interfaces with monitoring applets open HTTP connections and keep them open to stream response data back to the applet. To prevent AppWeb from closing the connection, you may need to either increase the timeout value, or you may need to do some I/O to the applet to ensure it does not get closed.

 

© Mbedthis Software LLC, 2003-2204. All rights reserved. Mbedthis is a trademark of Mbedthis Software LLC.