uCosminexus Application Server, Web Container Functionality Guide
This subsection describes the conditions and precautions for using the HTTP response compression filter.
To use the HTTP response compression functionality, the following preconditions need to be satisfied:
The memory required for the HTTP response compression functionality is obtained with the following formula:
Memory-required-for-the-HTTP-response-compression-functionality (bytes) = Number-of-concurrent-executions-of-the-HTTP-requests-that-enable-the-HTTP-response-compression-functionality Response-compression-threshold (bytes)
The compression threshold is used for determining whether to compress the HTTP response depending on the size of the HTTP response body. Only when the size of the HTTP response body exceeds the size defined in the compression threshold, the HTTP response will be compressed. Note that the compression threshold is specified for HTTP requests.
Define the compression threshold in the DD (web.xml). When the size of the HTTP response is small, by defining the compression threshold you ensure that the time required for HTTP response compression is not longer than the time required for communication.
Decide an appropriate size for the compression threshold depending on the type of resources you want to compress and the speed of communications line. Hitachi recommends that you acquire the size defined in the compression threshold using the actual measurements and define the appropriate size.
You can specify conditions for enabling the HTTP response compression functionality. The conditions that can be specified are explained below.
Figure 2-13 Example with '*.html' specified as the UTL pattern of the HTTP request that executes HTTP response compression
Figure 2-14 Example with 'text/html' specified as the Media-Type of HTTP response that executes HTTP response compression
Figure 2-15 Example with '200 bytes' specified as the body size of the HTTP response that executes HTTP response compression
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.