Requests to local CouchDB have 40ms latency
This is caused by Nagle's algorithm. CouchDB sends the HTTP headers and the response body in separate calls, causing the kernel to not deliver the response body for 40ms.

As a workaround, you can use this LD_PRELOAD shim to completely turn off Nagle's algorithm for the database process.