in reply to Lower hosting costs with compression

Very interesting points here. I've used mod_gzip on Apache for a while, and if you have lots of text documents, it does do a nice job of compressing them. Once your site gets graphical, or you have lots of already compressed files, then it does get less efficient.

You can also have mod_gzip compress output from your CGI scripts too, which is very clever. I've not tested gzip extensivley, but it seems to be reliable, I never had any problems with it.

Interstingly enough if Apache detects that a file is already present in both gzip and raw, then it aborts any inline compression, and sends the existing gzip file automatically. I don't think that the rewrite rule is required, it just happend automatically if you have Multiviews on (I need to check that).

As ever merlyn has a column on inline compression at his site.

  • Comment on Re: Lower hosting costs with compression

Replies are listed 'Best First'.
Re: Re: Lower hosting costs with compression
by tstock (Curate) on Oct 23, 2001 at 18:20 UTC
    I read just a few documents on multiviews and content negotiation provided by mod_negotiation, but couldn't get it to "prefer" serving .gz encoding if an uncompressed file was present. My wrong maybe, I found "LanguagePriority" but no "EncodingPriority" ?

    From other documents around the web I got the impression it was mainly for languages, where you can have a file.html.eg and a file.html.fr for English and French. A quote from "<A href=http://httpd.apache.org/docs-2.0/misc/perf-tuning.html">Apache performance notes" on the apache.org site says "If at all possible, avoid content-negotiation", and with these two problems I turned to the rewrite rule.

    merlyns column uses gzip for content-type.

    Tiago