Compressing Web Content with mod_gzip and mod_deflate
With a few simple commands and a little bit of configuration, an Apache Web server can deliver a large amount of content in a compressed format. These benefits are not simply limited to static pages; dynamic pages generated by PHP and to other dynamic content generators can be compressed by using the Apache compression modules. When added other performance-tuning mechanisms and appropriate server-side caching rules, these modules can reduce substantially necessary bandwidth for a very low cost.
Resources
mod_gzip: the Apache 1.3.x version is located at sourceforge.net/projects/mod-gzip, and the Apache 2.0.x version is located at www.gknw.de/development/apache/httpd-2.0/unix/modules.
Stephen Pierzchala is senior diagnostic analyst for Keynote Systems in San Mateo, California. His focus is on analyzing Web performance data and evangelizing on Web performance topics, such as content compression, caching and persistent connections. He can be contacted at stephen@pierzchala.com.
- « first
- ‹ previous
- 1
- 2
- 3
- 4
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- RSS Feeds
- Senior Perl Developer
- Technical Support Rep
- Introduction to MapReduce with Hadoop on Linux
- Weechat, Irssi's Little Brother
- What the author describes
34 min 7 sec ago - Reply to comment | Linux Journal
4 hours 44 min ago - Reply to comment | Linux Journal
5 hours 29 min ago - Didn't read
5 hours 40 min ago - Reply to comment | Linux Journal
5 hours 45 min ago - Poul-Henning Kamp: welcome to
7 hours 55 min ago - This has already been done
7 hours 56 min ago - Reply to comment | Linux Journal
8 hours 41 min ago - Welcome to 1998
9 hours 29 min ago - notifier shortcomings
9 hours 53 min ago
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
I had no idea you could do
I had no idea you could do this. Should come in handy as I don't have much bandwidth at the moment and am hosting a few large images and zips. Only concern would be extra CPU load.
Great article, thank you for
Great article, thank you for sharing.
mod_deflate
Article about mod_deflate settings like on Amazon EC2 AMI
http://railsgeek.com/2008/12/16/apache2-httpd-improving-performance-mod_...
Nice Work!
A great and informative article!
Really helped me!!
Hi,
It's really a great artical and really helped me. One question from myside is..
Is there anyway of copressing .tiff files by using mod_gzip??
Plz help me, if anyone has idea about the same.
Thanks in advance..
Ashutosh
Brain Cancers
I read your article.The things you have written sound very sincere and nice topics i am looking forward to its continuation.
Re: Compressing Web Content
stephen,
good article summarizing the methods and benefits of compressing web pages. however, you should touch on the difficulty of using mod_gzip with mod_ssl under apache 1.3.x -- this is a cumbersome issue and there are only workaround solutions. one such is to use a mod_proxy frontend virtual server to buffer the ssl request, and a mod_gzip backend virtual server to handle the compression. more detail on this two stage approach is here:
http://lists.over.net/pipermail/mod_gzip/2002-February/005911.html
i have implemented the above method on a few production servers and it does indeed work, with some caveats.
i believe that i read somewhere that apache 2.x had improved handling of the gzip/ssl pairing. not having played with 2.x i'm not in a position to say whether or not it actually works. perhaps someone could comment on this.
regards,
jim
At what cost to the CPU
Great article! I enjoyed reading it and found it very informative. One question though...
What will this module do to my CPU? Will the load average on my box go through the roof everytime I need to send out a compressed webpage? I think this would have been a nice point to look at as part of your article.
Really helped me!!
Hi,
It's really a great artical and really helped me. One question from myside is..
Is there anyway of copressing .tiff files by using mod_gzip??
Plz help me, if anyone has idea about the same.
Thanks in advance..
Ashutosh
compressing .tiff files
To compress TIFF files, simply remove the following exlusion for images from the above example configuration:
mod_gzip_item_exclude mime ^image/.*$
Also, add the .tif file extension in the file inclusions:
mod_gzip_item_include file \.(tif)$
Please let me know if you add this because I'd like to test a browser implementation against it. Thanks.
Marcus Adams
yEnc Decoder Proxy