couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Lehnardt <>
Subject Re: Varnish and Multi-doc Fetch?
Date Fri, 11 Sep 2009 18:12:15 GMT

On 11 Sep 2009, at 19:58, Paul Davis wrote:

> On Fri, Sep 11, 2009 at 1:28 PM, Zachary Zolton
> <> wrote:
>> Hi,
>> I'm testing out using Varnish for my application, and so far most
>> everything "just works" with CouchDB. The only real problem I have is
>> that I'm using (probably abusing!) the multi-doc fetch feature, which
>> results in a POST request that Varnish isn't gonna cache.
>> (As an aside, I'm likely not properly de-normalizing my data—since  
>> I'm
>> using the multi-doc fetch much like one would use SQL joins. I do  
>> plan
>> some big refactoring...!)
>> Two potential solutions I thought of:
>> 1) Cache POST requests in my Varnish config—this sounds like a can of
>> worms though, since POSTs can also be used for creating documents  
>> (not
>> to mention all the VCL-fu required)
>> 2) Add a GET multi-doc fetch feature to CouchDB—however, I'm guessing
>> there's a good reason why we don't already have this, right?  (^_-)
>> Anyways, I was wondering if anyone else has dealt with this situation
>> or has any ideas.
>> Cheers,
>> Zach
> Zach,
> The original motivation for not using GET was basically:
> 1. URL lengths are limited
> 2. GET's with bodies aren't consistently supported
> 3. POST!
> Its been often requested to allow for a GET url parameter to multi-key
> fetch, even in the face of the length limitations. If you *really
> really* want it, then patches welcome, if you only *really* want it,
> then you could make sure that there's a ticket open and then throw
> things at me till it gets done.
> Also, this shouldn't be too difficult of a patch. I'm thinking along
> the lines of just adding a multi=[key1, key2, key3...] parameter. Or
> perhaps fetch=key&fetch=key&fetch=key. But the code all stays pretty
> shallow. It'd just be hooking that up and passing it to the function
> in place of the value that normally gets grabbed form the body.

We could also start supporting GET bodies :)

Moving to dev@.


View raw message