couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Futon Test Suite
Date Thu, 11 Aug 2011 09:29:37 GMT
On Thu, Aug 11, 2011 at 3:47 AM, Jason Smith <jhs@iriscouch.com> wrote:
> On Thu, Aug 11, 2011 at 2:29 PM, Robert Newson <rnewson@apache.org> wrote:
>> I wonder if we should add a custom request header like
>> X-CouchDB-NoCache which sets all the cachebusting headers (Expires in
>> the paste, etc) rather than that hack.
>
> There are several reasons for an invalid (cached) response.
>
> * reverse-proxies
> * forward proxies
> * transparent forward proxies
> * Browsers
>
> People are testing couch in these and probably other environments,
> knowingly and unknowingly.
>
> I am not so sure that setting headers into the past would fix things
> in enough cases. The point of the ?_=$RANDOM (used in jQuery and RoR
> also) is because querying a completely different URL is the only way
> to be sure of a cache miss.
>
> Indeed, Varnish's "pain pill" sales pitch is, "put me in front of your
> slow web app and it will become faster." Well, that is because
> Varnish, prudently, disregards all of your server's cache metadata and
> basically caches everything it can. And people love it for that. (Yes,
> you can configure Varnish properly, but I am describing the pain-pill
> scenario where Rails is crashing under load.)
>
> I guess my point is, the test suite should work through caching
> proxies, and cache-busting based on headers is AFAIK unlikely to
> succeed.
>

All very good except this one paragraph. The CouchDB definitely should
not be expected to run with an intermediary server. If an intermediary
is broken, its quite all right that we engineer paths around
brokenness, but that's secondary by many orders of magnitude to
asserting the behavior of CouchDB's API.

> If, however, CouchDB did support a mechanism to make everything as
> un-cacheable as possible, I would rather see it as a _config setting
> rather than a header. Adding headers to queries is a way to invalidate
> an oauth signature. And, I don't know, for debugging and
> troubleshooting, if you command CouchDB to act funny, I'd rather that
> command to persist there in the config rather than I have to discover
> it myself in Wireshark.
>
> --
> Iris Couch
>

Mime
View raw message