I help a friend run a web site that has a large number of files and takes up quite a bit of disk space. Sadly, I don't have infinite disk space and with the other things we want to do with the site, doubling the space usage isn't really an option.
So that said, I was looking into what mod_perl modules can help and Apache::DynaGzip or Apache::Compress seemed to fit the bill but only from a bandwidth viewpoint. My idea is the possibility of archiving all my HTML pages (ie creating index.html.gz) and then only decompressing the page should the client NOT support gzip encoded pages. The links in the pages would still be just 'index.html' etc.
So that leads me to this RFC. I think this has a practical application on my server as I can apply the same treatment to areas of high traffic.
My initial thoughts were to somehow extend Dynagzip or at least act as a proxy object to it. I can then choose to add this extra level of compression at the Apache config file level and so control what I do by location, file extension and directory as you would with other modules and directives.
This seems to be the way to go as reading its documentation it handles 99% of the things I would want. However, in all honesty this would be my first mod_perl module and so am a bit of a newbie in this area. I've got the Mod Perl cookbook and the Oreilly book so I am at least able to RTFM if booted in the right direction :). I have also read the
content compression faq. As well as the other tutorials on perl.apache.org :)
So what do people think? Is this feasible, the right approach and does anyone have any suggestions/things for me to think about?
I'm running a Red Hat linux box with Apache 1.3.27, mod_perl 1.26 and Perl v5.6.1. I've already got Compress::Zlib v.1.14 and Apache::Compress v1.3 (they were pre-installed on this host). I don't, however, have Dynagzip installed though I am concerned by its low version number so would appreciate any comments on that too.