Chapter 10: HTTP Connectors . redirectPort . SSLEnabled
Chapter 10: HTTP Connectors . redirectPort . SSLEnabled . scheme . secure . URI Encoding . useBodyEncodingForURI . use IPV Hosts . xpoweredBy Other APR Connector specific attributes are described in the sections to follow. Kernel Mode File Transfer Sendfile() Optimization One of the core features of enabling APR is the ability to send a large file via a kernel-level sendfile() system call. This call is optimized for sending large static files through a socket. Instead of repeatedly copying the file data to higher level buffers, such as those maintained in byte arrays within the Java VM, the kernel mode API takes care of sending the file directly from the file system s buffer cache. Although this sendfile() operation is performed synchronously by the kernel, it is asynchronous with respect to the Java VM. This theoretically enables the Tomcat server to perform other work while the file is being sent by the lower-level call. This feature cuts down on CPU time spent on data copying as well as minimizing the context switches between the Java VM and kernel mode operations during the sending of very large file. On systems without the kernel mode sendfile() system call, the Tomcat Connector gracefully falls back on the Java-based buffer IO to send large static files. In addition, the sendfile()operation does not take effect when SSL is used with the connector. The default Servlet, configured in the conf/web.xml file, is responsible for serving static content and has a sendfileSize attribute that you can configure to control the minimal size of a static file being considered for transmission via the sendfile()call. Scalable Keep-Alive Poller The keep-alive poller is an APR component responsible for maintaining keep-alive connections. The number of kernel modes to the Java VM context switches is reduced when a native code component is used to keep track of keep-alive connections. The following additional attributes are available for configuration with the APR Connector enhancements: . firstReadTimeout: This value, in milliseconds, controls the timeout set on a connection s first read call. If this timeout is reached, the connection is handed off to the keep-alive poller. Note that if this timeout value is never reached, the keep-alive poller does not get involved with the connection. If you want to use the keep-alive poller every time, you can set the value to 0, -1. Both will hand off connections to the poller on every read; however, 0tells the poller to use a very short timeout, and -1 indicates the use of the connection s configured socket timeout value. Default value is -1. Note that -2 can also be used to request the runtime to bypass the use of the poller as much as possible.
For reliable and cheap web hosting services please check cheap web hosting website.