The Network Cache and Accelerator (NCA) increases web server performance by maintaining an in-kernel cache of web pages that are accessed during HTTP requests. This in-kernel cache uses system memory to significantly increase performance for HTTP requests that are normally handled by web servers. Using system memory to hold web pages for HTTP requests increases web server performance by reducing the overhead between the kernel and the web server. NCA provides a sockets interface through which any web server can communicate with NCA with minimal modifications.
In situations where the requested page is retrieved from the in-kernel cache (cache hit), performance improves dramatically. In situations where the requested page is not in the cache (cache miss) and must be retrieved from the web server, performance is also significantly improved.
This product is intended to be run on a dedicated web server. If you run other large processes on a server that runs NCA, problems can result.
NCA logs all cache hits. This log is stored in binary format to increase performance. The ncab2clf command can be used to convert the log from binary format to common log format (CLF).
The Oracle Solaris release includes the following enhancements:
Sockets interface.
Support for vectored sendfile, which provides support for AF_NCA. See the sendfilev(3EXT) man page for more information.
New options for the ncab2clf command that support the ability to skip records before a selected date (–s) and to process a specified number of records (–n).
logd_path_name in ncalogd.conf can specify either a raw device, a file, or a combination of the two.
Support for a web server to open multiple AF_NCA sockets. With multiple sockets, you can have different web servers that run on one server.
A new configuration file, /etc/nca/ncaport.conf, to manage the IP addresses and ports that NCA uses. If web server does not provide native support for the AF_NCA socket, use this file and the NCA socket utility library to convert an AF_INET socket to an AF_NCA socket.
For task information about managing and administering web cache servers, refer to Managing Web Cache Servers Task Map and Administering the Caching of Web Pages.
The NCA feature includes the following components.
Kernel module, ncakmod
Web server, httpd
The kernel module ncakmod maintains the cache of web pages in system memory. The module communicates with a web server, httpd, through a sockets interface. The family type is PF_NCA.
The kernel module also provides a logging facility that logs all HTTP cache hits. NCA logging writes HTTP data to the disk in binary format. NCA provides a conversion utility for converting binary log files to common log format (CLF).
The following figure shows the flow of data for the conventional path and the path that is used when NCA is enabled.
Figure 1 Data Flow With the NCA Service
The request flow between the client and the web server proceeds as follows:
An HTTP request is made from the client to the web server.
If the page is in cache, the in-kernel cache web page is returned.
If the page is not in cache, the request goes to the web server to retrieve or update the page.
Whether the page is cached depends on the HTTP protocol semantics that are used in the response, or not. If the Pragma: No-cache header is included in the HTTP request, the page is not cached.
The page is returned to the client
The following table lists the files that are necessary to support the NCA feature. Many of these files are ASCII, but some of the files are binary.
|