Is there any reasons to use ngx_http_gzip_module

demas asked:

I use Redmine with Passenger and Nginx. I’m just wondering if there are any reasons to use gzip on option?

As I understand the CPU usage will be increased if I set this option on, but the users with slow internet connection get the pages faster.

But may be there are any recommendation or testes which help me to make the right decision.

My answer:

Using compression, your CPU usage will be higher, but your bandwidth utilization will be lower. If you’re paying for bandwidth by the gigabyte (and many of us do) then this will benefit you as well.

@ChrisS makes good recommendations, but I’ll expand on them a bit:

  • Static content that is already highly compressed, such as audio and video files, doesn’t really benefit from gzip encoding, so there’s no reason to waste your CPU trying to compress them again.
  • Static text-based content such as CSS and JavaScript files can be easily compressed, and nginx can handle this easily. Use gzip on for these content types.
  • Dynamically generated content should be gzip compressed by the web application instead of nginx, as it has a much better idea of whether the content should be compressed or not.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.