This GemPlugin will gzip your HTTP responses from mongrel if the client says that it supports it (eg, most modern browsers). I''ve tested it in IE6, Firefox 1.5 and Firefox 2.0RC3 Install: gem install gzip_filter --source http://edenli.com Configure (assuming rails): cd RAILS_ROOT echo ''uri "/", :handler => plugin("/handlers/gzipfilter")'' >> config/mongrel.conf Run: mongrel_rails start -S config/mongrel.conf If you want to use this with a cluster, add "config_script: config/mongrel.conf" to your config/mongrel_cluster.yml file. Somewhat related: I also patched the deflatefilter against mongrel 0.13.5 to work with IE and (probably) Safari. It''s available here if you want to use the deflate encoding instead (savings difference is miniscule): http://rubyforge.org/tracker/?func=detail&aid=6275&group_id=1306&atid=5147
On Mon, 23 Oct 2006 05:16:46 +0800 "Eden Li" <eden.li at gmail.com> wrote:> This GemPlugin will gzip your HTTP responses from mongrel if the > client says that it supports it (eg, most modern browsers). I''ve > tested it in IE6, Firefox 1.5 and Firefox 2.0RC3Nice, thanks for this.> Somewhat related: > I also patched the deflatefilter against mongrel 0.13.5 to work with > IE and (probably) Safari. It''s available here if you want to use the > deflate encoding instead (savings difference is miniscule): > http://rubyforge.org/tracker/?func=detail&aid=6275&group_id=1306&atid=5147Ah, so you figured it out. I''ll take a look and try to apply it for the next release. -- Zed A. Shaw, MUDCRAP-CE Master Black Belt Sifu http://www.zedshaw.com/ http://mongrel.rubyforge.org/ http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
Eden Li wrote:> This GemPlugin will gzip your HTTP responses from mongrel if the > client says that it supports it (eg, most modern browsers).Is this is only meant for apps that just use mongrel and nothing in front of it? I would assume you can just switch on output compression in Apache, if you''re using that. But maybe I''m missing something here.. Jeroen
Pretty much, but that seems to be a common setup. I use pen to load balance across a mongrel cluster, so mongrel is serving up my rails app directly. Nowhere is apache in the picture. On 10/23/06, Jeroen Houben <jeroen at supercool.nl> wrote:> Is this is only meant for apps that just use mongrel and nothing in > front of it? I would assume you can just switch on output compression in > Apache, if you''re using that. But maybe I''m missing something here..
On 10/23/06, Jeroen Houben <jeroen at supercool.nl> wrote:> Eden Li wrote: > > This GemPlugin will gzip your HTTP responses from mongrel if the > > client says that it supports it (eg, most modern browsers). > > Is this is only meant for apps that just use mongrel and nothing in > front of it? I would assume you can just switch on output compression in > Apache, if you''re using that. But maybe I''m missing something here.. >Does apache gzip dynamic requests? I don''t think lighttpd did in my experience. -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com
On Mon 23.10.2006 02:25, Rick Olson wrote:>On 10/23/06, Jeroen Houben <jeroen at supercool.nl> wrote: >> >> Is this is only meant for apps that just use mongrel and nothing in >> front of it? I would assume you can just switch on output compression >> in Apache, if you''re using that. But maybe I''m missing something >> here.. >> > >Does apache gzip dynamic requests? I don''t think lighttpd did in my >experience.Since 2.x the mod_deflate is integrated and can be configured to deliver some content compressed: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html Lighty can also compress the content: http://trac.lighttpd.net/trac/wiki/Mod_Deflate and of course nginx also ;-): http://wiki.codemongers.com/NginxHttpGzipModule Hth Aleks
> Since 2.x the mod_deflate is integrated and can be configured to deliver > some content compressed: > > http://httpd.apache.org/docs/2.0/mod/mod_deflate.html > > Lighty can also compress the content: > > http://trac.lighttpd.net/trac/wiki/Mod_Deflate > > and of course nginx also ;-): > > http://wiki.codemongers.com/NginxHttpGzipModule > > Hth > > Aleksah, well there you go. there are a few cases where you''re not behind one of those and you may need something like this. Hell, I hacked up a quick regex/rewrite plugin for the same reason (http://svn.techno-weenie.net/projects/mongrel/mongrel_pattern_recognition/). that''s why I love mongrel :) -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.com
On Mon 23.10.2006 03:23, Rick Olson wrote:>Aleksandar Lazic wrote:[snipp]>> and of course nginx also ;-): >> >> http://wiki.codemongers.com/NginxHttpGzipModule >> >> Hth >> >> Aleks > >ah, well there you go. there are a few cases where you''re not behind >one of those and you may need something like this. Hell, I hacked up a >quick regex/rewrite plugin for the same reason >(http://svn.techno-weenie.net/projects/mongrel/mongrel_pattern_recognition/). >that''s why I love mongrel :)Yep sometimes one tool is enough ;-) Regards Aleks