memcache_assume_gzipped for 1.2.6

Daniel Church crazynorman at gmail.com
Thu Dec 20 22:08:58 UTC 2012


Looks like that's only in the "development" version though and not the
"stable" version.  May have been smarter to back-port the feature rather
than adding a different one though.

On Thu, Dec 20, 2012 at 5:03 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Thu, Dec 20, 2012 at 02:51:44PM -0500, Daniel Church wrote:
>
> > I'm running nginx on a cheap VPS, which has pretty horrible disk i/o.  As
> > such I keep most of my content in memcached so that nginx never has to
> hit
> > the disk, a good mix of cached dynamic and cached static content.  I
> wanted
> > to use GZIP compression without wasting CPU cycles gzipping memcached
> > content over and over again.
> >
> > I created a flag "memcache_assume_gzipped" to the memcache module.  If
> you
> > turn it on for a location, it will append "Content-type: gzip" to the
> > headers of the response inside the memcache module.  This way, you can
> gzip
> > content (level 9), store it straight into memcache, and then nginx will
> > return it with the appropriate headers.  Example here:
> >
> > http://alpha.criticalmeltdown.com/demo/2
> >
> > Is this something anyone is interested in incorporating into the current
> > stable branch, or is it too much of a niche need?  If anyone wants it, I
> > can throw together a patch file.
>
> There is already memcached_gzip_flag, which allows to add
> "Content-Type: gzip" based on flags a memcached item.
>
> http://nginx.org/r/memcached_gzip_flag
>
> And even gunzip module which allows to gunzip such responses for
> clients which doesn't support gzip.
>
> http://nginx.org/r/gunzip
>
> Not sure why you want to introduce another directive for this.
>
> --
> Maxim Dounin
> http://nginx.com/support.html
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20121220/fea66923/attachment.html>


More information about the nginx-devel mailing list