Embedthis Appweb 3.4.0
Home > Users Guide > Configuration Directives > Performance Directives

Quick Nav

See Also

Performance Directives

KeepAlive

Description Control the use of HTTP Keep-Alive
Synopsis KeepAlive [on | off]
Context Default Server, Virtual Host
Example KeepAlive on
Notes

The KeepAlive directive enables HTTP Keep-Alive where a single TCP/IP connection may be reused for multiple requests. This can significantly speed up overall performance.

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 via the Keep-Alive HTTP request header.

KeepAliveTimeout

Description Control the timeout period for TCP/IP connections
Synopsis KeepAliveTimeout seconds
Context Default Server, Virtual Host
Example KeepAliveTimeout 120
Notes

This directive defines the time to keep connections open waiting for further requests from the client. If further requests arrive, the timeout period is restarted.

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

MaxKeepAliveRequests

Description Define the maximum number of requests for a connection.
Synopsis MaxKeepAliveRequests number
Context Default Server, Virtual Host
Example MaxKeepAliveRequests 50
Notes

This directive defines the maximum number of requests that may be serviced using a single TCP/IP connection.

Security

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
Notes

This directive sets the TCP/IP buffer size. Increasing its value can improve throughput and lower CPU usage. You should only need to do this for very high data rates.

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

Timeout

Description Controls the request timeout period
Synopsis Timeout seconds
Context Default Server, Virtual Host
Example Timeout 600
Notes

This directive defines the number of seconds of I/O inactivity to wait before cancelling a client request.

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.

© Embedthis Software LLC, 2003-2012. All rights reserved. Embedthis, Ejscript and Appweb are trademarks of Embedthis Software LLC.