I am trying to use the bigpipe concept on our website. This means trying to send the answer in pieces, rather than sending it as a whole, so that the user feels that the page is running fast. I succeed using the flushBuffer method for the response object in java. But now, when I try to compress the content with the apache mod_deflate module, the fragment is lost.
Here is the configuration from apache used to compress content
**
Start mod_deflate config
DeflateBufferSize 100 AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \bMSIE !no-gzip !gzip-only-text/html DeflateFilterNote Input input_info DeflateFilterNote Output output_info DeflateFilterNote Ratio ratio_info LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate CustomLog /var/log/httpd/deflate_log deflate
End mod_deflate config **
Here is the response header when deflate is enabled in apache
Connection: Keep-Alive
Content-Encoding: GZIP
Content-Length: 7916
Content-Type: Text / html; encoding = UTF-8
Date: Fri, 27 Jan 2012 20:11:11 GMT
Keep-Alive: timeout = 300, max = 3997
Server: apache
Vary: Accept-Encoding
Answer header when deflation is disabled in apache
Connection: Keep-Alive
Content-Type: Text / html; encoding = UTF-8
Date: Fri, 27 Jan 2012 20:21:14 GMT
Keep-Alive: timeout = 300, max = 3997
Server: Apache / 2.2.3 (CentOS)
Transmission Encoding: chunked
As you can see above, two headers only work if compression is disabled. I searched the Internet about this, and people suggested reducing the value of DeflateBufferSize . I reduced the value to 100 bytes, as you can see in my apache configuration, but this has not solved the problem yet. DeflateBufferSize set to 100 bytes means that the response is buffered in apache until 100 bytes are received and then compressed.
I watched the mod_gzip module, which was linked with old apache 1.3, and this module has the following directive, which allows you to download fragmented content.
mod_gzip_dechunk Yes
Does anyone know about such a directive in mod_deflate bundled with apache 2.x?
Or does anyone know how to compress tagged content?