incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Stuart (SuperCoders)" <>
Subject Re: Does CouchDB support gzip encoding?
Date Wed, 25 May 2011 07:05:02 GMT
I put nginx in front of the server as a reverse proxy and configure it  
to do the GZIP compression.


On 25/05/2011, at 5:01 PM, Torstein Krause Johansen wrote:

Hi all,

first of all, thanks for a great product. I've been enjoying my first
weeks with CouchDB, its simplicity and RESTfulness as well as couchapp
allowing me to spread out the map, reduce & lists into separate JS
files. Wonderful. Now, after searching the high and low on the web,
I'm still left with one big question:

Does Couch support gzip encoding? If yes, how can I enable it?

Now, my current problem is read performance as in: the returned data
from my view is 14M and it takes 6-8 seconds to download because of
the sheer size. I've tried to add accept encoding=gzip,deflate to my
HTTP client, but to no avail, I still get text back. Is there a way I
can get gzip-ed content back from Couch?

A bit of background for these sizes: Each row looks like this:


I first do a GET on this view to get the entries matching the first +
second integer + the date (and corresponding end date). My second GET
to Couch is then done for each of the values found in "value" on which
I do a _count/reduce to get the number of occurrences of this number.
The total time of an accumulated overview of all values & with count
(within the three given restraints you can see in the key) is 7-8

Most of this time is spent getting the initial result and it's mostly
down to the time it takes to download the 14M of data, ~165,000 rows.
If these would be delivered with encoding=gzip, the data size would be
around 1.1M (this is what running gzip on the downloaded content

Another related question I have is if there's a way to do bulk reads
just as we can do bulk updates (which are great by the way!). As other
people have written before, it's the HTTP negotiation which is the
real hurdle with Couch performance (as well as view checkpoint
updates, of course).

Best regards,


couchdb:  0.11.0-2.3
OS: Debian wheezy/sid
Message  protected by MailGuard: e-mail anti-virus, anti-spam and  
content filtering.
Click here to report this message as spam:

View raw message