Forum Discussion
thagmann_128177
Nimbostratus
Mar 25, 2005Compression iRules - GZIP vs. Deflate Preference
F5 DevCentral,
Hi, our understanding is that when doing a Profile that utilizes Compression that BIGIP will prefer the Deflate vs. GZIP method. We would like to have a rule that utilizes GZIP by default.
The current rule we are using to do this is:
===================================
b rule force_gzip '{ when HTTP_RESPONSE { [COMPRESS::method prefer gzip] }}'
which gives us
[rootxxxxxxx:Active] config b rule list
rule force_gzip {
when HTTP_RESPONSE { [COMPRESS::method prefer gzip] }
}
When we then associate this rule with a VIP we get an error.
ERROR in /var/log/ltm
===================================
Mar 25 22:31:03 tmm tmm[702]: 01220001:3: TCL error: Rule force_gzip - invalid command name "" while executing "[COMPRESS:
:method prefer gzip]"
Do you have any ideas what we might be doing wrong?
Thanks,
-t
12 Replies
- Corey_Smith_174
Nimbostratus
Just an FYI but the Deflate and GZIP compression methods are exactly the same. The only difference between the two is that GZIP has additional data structures to support filenames/directories etc... The reason why F5 defaults to Deflate is because it will always give you smaller transfer sizes since web content does not the additional features GZIP provides.
See RFC1951 and RFC1952
-Corey - drteeth_127330Historic F5 AccountCorsmith, you are largely correct. F5 used to prefer deflate since it is slightly more efficient to compute due to some additional checksumming required by gzip. However, future versions of BIG-IP will prefer gzip for greater compatibility.
The zlib faq explains why:
http://www.gzip.org/zlib/zlib_faq.html
What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
"gzip" is the gzip format, and "deflate" is the zlib format. They should probably have called the second one "zlib" instead to avoid confusion with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616 correctly points to the zlib specification in RFC 1950 for the "deflate" transfer encoding, there have been reports of servers and browsers that incorrectly produce or expect raw deflate data per the deflate specficiation in RFC 1951, most notably Microsoft. So even though the "deflate" transfer encoding using the zlib format would be the more efficient approach (and in fact exactly what the zlib format was designed for), using the "gzip" transfer encoding is probably more reliable due to an unfortunate choice of name on the part of the HTTP 1.1 authors.
Bottom line: use the gzip format for HTTP 1.1 encoding.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
