incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <>
Subject Re: perfomance?
Date Wed, 24 Mar 2010 10:49:02 GMT
I checked the source. CouchDB will honor a Connection: Keep-Alive from
an HTTP 1.0 client (couch_httpd.erl's http_1_0_keep_alive/2).

I have measured the difference between serving static files from
apache2 vs. attachments from couchdb. It's always faster to do so via
apache2, and, on average, couchdb was 2-4 times slower at serving the
same data as apache2.

This doesn't surprise me. Attachments are interleaved in chunks so
that concurrent writers do not block each others progress (since only
one process can append to a file at a time). So reading a file from
couchdb involves seeking to those chunks (and they're small, 4k or
less) and then sending them. As Randall points out, apache2 can just
call sendfile().


On Wed, Mar 24, 2010 at 10:17 AM, Vasili Batareykin <> wrote:
> browser/server/proxy with this feature(pipeline)?
> about http-rfc violation. apache process this request without any problems.
> why couchdb not?
> 2010/3/24 Robert Newson <>
>> iirc apachebench only speaks http/1.0 but uses a common violation to
>> support keep-alive. This likely confuses CouchDB which speaks
>> http/1.1.
>> keep-alive is also not the same as pipelining. keep-alive just reuses
>> connections, whereas HTTP pipelining sends multiple requests without
>> reading the responses. The responses are read as a batch later; this
>> allows you to largely circumvent the latency of a network roundtrip.

View raw message