Memcached_gzip_flag

I’m running nginx 1.3.9 with memcached_pass and I have set
memcached_gzip_flag in an attempt to serve gzipped content directly from
memcached (mainly to save memory on my memcached processes, which get
pretty
large). My gzip flag is being detected properly–nginx adds the
Content-Encoding header–but I get 330 errors saying the content
encoding is
incorrect. Every test I’ve made indicates that the data I am storing is
valid gzipped data. Does anyone have any advice on how to troubleshoot
this?

Thanks so much!

Posted at Nginx Forum:

PS: I’m writing the data using Dalli (GitHub - petergoldstein/dalli: High performance memcached client for Ruby)
with
compression on and raw set to true. Dalli sets the bitmask for
compression
to 0x2 (all of this appears to be working correctly).

Posted at Nginx Forum:

Hello!

On Mon, Dec 10, 2012 at 11:16:54AM -0500, tkellen wrote:

PS: I’m writing the data using Dalli (GitHub - petergoldstein/dalli: High performance memcached client for Ruby) with
compression on and raw set to true. Dalli sets the bitmask for compression
to 0x2 (all of this appears to be working correctly).

As far as I can tell from [1], it stores zlib stream, not gzip
(which is a different format on top of the same compression
algorithm, see zlib.h for details). It likely can be easily
adapted to use gzip though.

[1] dalli/lib/dalli/compressor.rb at main · petergoldstein/dalli · GitHub


Maxim D.

On Monday 10 December 2012 20:16:54 tkellen wrote:

PS: I’m writing the data using Dalli (GitHub - petergoldstein/dalli: High performance memcached client for Ruby)
with compression on and raw set to true. Dalli sets the bitmask for
compression to 0x2 (all of this appears to be working correctly).

But Dalli for compressed data uses zlib wrapper instead of gzip one.

wbr, Valentin V. Bartenev

http://nginx.org/en/donation.html

Right you are. Thanks for the second set of eyes! I’ve submitted a PR
to
Dalli to add a gzip compressor and I’m using a custom one now. It’s
working
wonderfully.

Posted at Nginx Forum: