Search ServerWatch
Search ServerWatch
Search ServerWatch




Continuous Real-time Data Protection and Disaster Recovery
Whitepaper: Learn how building a solid foundation from a flexible solution can not only integrate all elements within your datacenter - computing, storage, power and management - but prepares your data to survive and recovery... »
Virtualization - It's Not Just for Enterprises Anymore
Whitepaper: Read how virtualization can help companies of all sizes vastly increase server utilization levels, delay or avoid hardware purchases, and expand infrastructure capacity without increasing physical space requirements. »
Rightsizing Blades for the Mid-market
Whitepaper: Examine the requirements for servers, storage, and blade systems in the mid-market and how to apply blades your data center in a cost effective manner. »
VMware Infrastructure 3, Planning
Whitepaper: Read about planning, deployment, and operation of an Adaptive Infrastructure based on VMware Infrastructure and HP servers, storage, and management technologies. »
Disaster recovery made easy with HP BladeSystem and VMware virtualization
Webcast: Learn how you can leverage HP BladeSystem and VMware ESX Server to build a cost effective DR solution that can grow with your business. »

Serve your customers, not your servers, with VERIO FreeBSD VPS. Click here for your full-access, test-drive.

ServerWatch > Tutorials

June 22, 2005
Using HTTP Compression
By Martin Brown

Effects on Server Performance

Contents

Why Compress
Suitable File Types
Enabling HTTP Compression
  - Apache
  - IIS 6
  - IIS 5 and Earlier
Effects on Server Performance
Summary

Compressing content obviously requires a certain amount of CPU time to compress the information for transfer. This compression process can have a detrimental effect on the site because each object selected must be compressed before sending. This is one area where IIS 6 has a leg up on Apache, as it creates a cache directory into which compressed files are kept, reducing the CPU load for frequently accessed pages. What it doesn't do is completely eliminate the need for inline compression. Heavily dynamic content must still be compressed on the fly, and there may be a finite amount of cache storage.

To be honest, it's unlikely that the loading in any test-heavy Web site will exceed the benefit obtained by using the compression. Savings of 50 percent in bandwidth deliver a significant site performance increase by sacrificing less than 10 percent (and often less than 1 percent) of CPU time. That's more than worth it, especially for enterprise paying by the megabyte for transfers.

Browser Support and Dynamic Content

Today, most browsers support some kind of compression, but the exact type of compression supported is browser dependent. This is not an issue you need to worry about; the Web server will send compressed documents only if the browser indicates it supports them. It is, however, worth examining the mechanism and looking at some of the supported compression types of different browsers.

A browser supplies, as part of its URI request, the compression formats it supports through the Accept-Encoding HTTP header. Apache (and others) make this information available through the HTTP_ACCEPT_ENCODING environment variable. Again, you don't actually need to do anything; Apache will automatically encode content appropriately if it identifies the browser can accept it through the HTTP header.

The table below lists various browsers and the encodings they support.

Browser Support for Compression Encodings
Browser Supported Encodings
Firefox 1.0, Mozilla 1.x, Camino gzip, deflate
OmniWeb 5.x bzip2, gzip, deflate
Safari gzip, deflate
Internet Explorer gzip, deflate

"Identity" is sometimes listed as a type. This means the browser supports uncompressed content (which is basically implied, so not all browsers explicitly state this).

As the list indicates, modern browsers support compression. Thus, clients don't need to do anything to actually use compressed content; the browser automatically supplies its supported encodings when it makes a request. So, to get a speed improvement you need configure only the server.

Summary

Using HTTP compression is a very simple way to improve site performance and decrease bandwidth by doing very little. There are potential downsides due to the additional CPU overheads required to support it, but they are relatively minor tradeoffs in comparison to the potential benefits.

And if it doesn't result in significant improvements? Disabling it is just as simple because the content of the site has not been modified, only the way the content is transferred.

Go to page 1  2  3  


Discuss this article
Tools:
Add serverwatch.com to your favorites
Add serverwatch.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x

Tutorials Archives




JupiterOnlineMedia

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Solutions
Whitepapers and eBooks
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Microsoft Article: 7.0, Microsoft's Lucky Version?
Microsoft Article: Hyper-V--The Killer Feature in Windows Server 2008
Avaya Article: How to Feed Data into the Avaya Event Processor
Microsoft Article: Install What You Need with Windows Server 2008
HP eBook: Putting the Green into IT
Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
Avaya Article: Setting Up a SIP A/S Development Environment
IBM Article: How Cool Is Your Data Center?
Microsoft Article: Managing Virtual Machines with Microsoft System Center
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Intel Video: Are Multi-core Processors Here to Stay?
On-Demand Webcast: Five Virtualization Trends to Watch
HP Video: Page Cost Calculator
Intel Video: APIs for Parallel Programming
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Sun Download: Solaris 8 Migration Assistant
Sybase Download: SQL Anywhere Developer Edition
Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
Red Gate Download: SQL Compare Pro 6
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
IBM Article: Collaborating in the High-Performance Workplace
HP Demo: StorageWorks EVA4400
Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES