incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torstein Krause Johansen <torsteinkrausew...@gmail.com>
Subject Does CouchDB support gzip encoding?
Date Wed, 25 May 2011 07:01:07 GMT
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:

<short>
Does Couch support gzip encoding? If yes, how can I enable it?
</short>

<longer>
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:

{"id":"30b095cb2ec80ee789374be98736e2bc","key":[3,7766,"2011-05-24"],"value":434}

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
seconds.

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
suggests).
</longer>

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,

-Torstein

couchdb:  0.11.0-2.3
OS: Debian wheezy/sid

Mime
View raw message