Hi Folks, We''re moving from a single lighttpd-hosted Rails box to a Apache/ mongrel cluster. In lighttpd, mod_compress had a very nice feature: if there''s a static file, it would compress it in a user-specified compress folder. If the file hasn''t changed, it would just serve out the compress file; if the file has changed, it would recompress it and serve it out. Is there such a deployment option in Apache? Also, I read in the "best practices" Apache/mongrel doc <http:// mongrel.rubyforge.org/docs/apache.html> of the use of mod_memcache and mod_cache. But I don''t see it configuration scripts associated with it. Anyone using these modules care to comment? Is it possible to use mod_cache in association with mod_deflate to accomplish what mod_compress does in lighttpd? Thanks! chao
You probably want mod_deflate httpd.apache.org/docs/2.0/mod/mod_deflate.html On 6/5/07, Chih Chao Lam <chao at nextsmallthings.com> wrote:> > Hi Folks, > > We''re moving from a single lighttpd-hosted Rails box to a Apache/ > mongrel cluster. > > In lighttpd, mod_compress had a very nice feature: > if there''s a static file, it would compress it in a user-specified > compress folder. If the file hasn''t changed, it would just serve out > the compress file; if the file has changed, it would recompress it > and serve it out. > > Is there such a deployment option in Apache? > > Also, I read in the "best practices" Apache/mongrel doc <http:// > mongrel.rubyforge.org/docs/apache.html> of the use of mod_memcache > and mod_cache. But I don''t see it configuration scripts associated > with it. Anyone using these modules care to comment? Is it possible > to use mod_cache in association with mod_deflate to accomplish what > mod_compress does in lighttpd? > > Thanks! > chao > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > rubyforge.org/mailman/listinfo/mongrel-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: rubyforge.org/pipermail/mongrel-users/attachments/20070605/239dc85c/attachment.html
Hi Scott, Thanks for the link. However, does mod_deflate cache the files it compresses? For static files, would it be compressing over and over, perhaps hundreds of times per second? Is there a way to avoid this? chao On Jun 5, 2007, at 4:19 PM, Scott Hodson wrote:> You probably want mod_deflate > > httpd.apache.org/docs/2.0/mod/mod_deflate.html > > > On 6/5/07, Chih Chao Lam <chao at nextsmallthings.com> wrote: > Hi Folks, > > We''re moving from a single lighttpd-hosted Rails box to a Apache/ > mongrel cluster. > > In lighttpd, mod_compress had a very nice feature: > if there''s a static file, it would compress it in a user-specified > compress folder. If the file hasn''t changed, it would just serve out > the compress file; if the file has changed, it would recompress it > and serve it out. > > Is there such a deployment option in Apache? > > Also, I read in the "best practices" Apache/mongrel doc <http:// > mongrel.rubyforge.org/docs/apache.html> of the use of mod_memcache > and mod_cache. But I don''t see it configuration scripts associated > with it. Anyone using these modules care to comment? Is it possible > to use mod_cache in association with mod_deflate to accomplish what > mod_compress does in lighttpd? > > Thanks! > chao > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > rubyforge.org/mailman/listinfo/mongrel-users > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > rubyforge.org/mailman/listinfo/mongrel-users-------------- next part -------------- An HTML attachment was scrubbed... URL: rubyforge.org/pipermail/mongrel-users/attachments/20070610/d04e1bc7/attachment-0001.html
On 10/06/07, Chih Chao Lam <chao at nextsmallthings.com> wrote:> Thanks for the link. However, does mod_deflate cache the files it > compresses? For static files, would it be compressing over and over, perhaps > hundreds of times per second? Is there a way to avoid this?mod_deflate doesn''t save the compressed response to requests for static files. "the unix way" to do this would be to periodically run find/gzip instead and allow mod_mime & mod_negotiation to serve the gzipped alternative file (AddEncoding & Options MultiViews iirc). Alternatively, mod_cache will do the job too, as long as you tell apache what expiries (mod_expires) are valid for your static content. Doing the latter is good practice anyway as it''ll offload some requests for clients that don''t support compression. -- noodl