SOL5379 - Overview of HTTP Compression and Chunked Content
SOL5379 - Overview of HTTP Compression and Chunked Content
SOL5379 - Overview of HTTP Compression and Chunked Content
Overview
Chunking is a technique that HTTP servers use to improve responsiveness. Chunking can help you avoid
situations where the server needs to obtain dynamic content from an external source and delays sending the
response to the client until receiving all of the content so the server can calculate a Content-Length header.
When chunking is enabled, instead of delaying sending packets to the client until all content is available, the
server will:
Apply markers within the content to indicate the length of each chunk and whether that particular chunk is
the last chunk that the server is sending.
Some operations involve modifying content, such as adding content using an iRule, or applying compression.
These operations need to first remove chunking (unchunk), perform the operation, and optionally reapply
chunking (rechunk) to the new content.
The HTTP profile has four modes available to specify how the system handles HTTP content with regards to
chunking. The behavior in each mode depends on whether the server sends chunked or unchunked responses.
Chunked content
Unchunk
Specifies that the system removes the HTTP transfer encoding headers, removes the chunk headers,
processes the HTTP content, and then sends the unchunked response to the client.
Rechunk
Specifies that the system unchunks the HTTP content, processes the data, re-adds the chunk headers,
and then sends the chunked request or response to the client.
Selective
Specifies that the system unchunks the HTTP content, processes the data, re-adds the chunk headers,
and then sends the chunked request or response to the client.
Note: For chunk ed content, this mode is the same as the Rechunk mode.
support.f5.com/kb/en-us/solutions/public/5000/300/sol5379.print.html 1/2
6/19/13 SOL5379 - Overview of HTTP compression and chunked content
Preserve
Specifies that the system processes the HTTP content, and sends the response to the client, unchanged.
Unchunked content
Unchunk
Specifies that the system processes the HTTP content, and sends the response to the client, unchanged.
Rechunk
Specifies that the system processes the HTTP content, adds the transfer encoding and chunk headers to
the response, and then sends the chunked response to the client.
Selective
Specifies that the system processes the HTTP content, and sends the response to the client, unchanged.
Preserve
Specifies that the system processes the HTTP content, and sends the response to the client, unchanged.
In BIG-IP LTM versions 9.4.0 and later, the default response chunking mode in the HTTP profile is selective.
Selective mode unchunks and rechunks data only if the payload is being modified.
In BIG-IP LTM versions 9.0.0 through 9.3.1, the default response chunking mode in the HTTP profile is
preserve. Preserve mode specifies that the content is to be preserved as the server sent it (chunked or
unchunked). In this mode, if the BIG-IP LTM detects chunked content, even if compression is enabled, the
BIG-IP LTM system does not attempt to compress the content. Therefore, only unchunked data from the server
is compressed.
To allow compression for chunked content, you must select the selective, unchunk, or rechunk mode;
however, selective mode is typically the preferred mode, so that originally unchunked data is not needlessly
chunked when forwarded to the client.
support.f5.com/kb/en-us/solutions/public/5000/300/sol5379.print.html 2/2