Using Varnish to accelerate CouchDB
joe at joetify.com
Sun Nov 7 00:00:25 CET 2010
On Nov 6, 2010, at 11:48 AM, Per Buer wrote:
> On Sat, Nov 6, 2010 at 12:32 PM, Karel Minařík <karel.minarik at gmail.com> wrote:
>> Hello, Michal,
>>> you will need some kind of cache invalidation. When you change the data
>>> in CouchDB, your application will have to notify Varnish the document
>>> has changed and should purge it form the cache.
>> well, that's certainly doable, but I would rather not mess with cache
>> invalidation -- that'd bring a whole different layer in the stack.
> I haven't really ever touched Couch, but from what I overheard I think
> you can embed custom code into the database, meaning it should not be
> to hard to wactually have the database call out to Varnish and
> invalidate the content itself.
> You might have more luck asking on the Couch list, though.
We (Cloudant) have actually discussed implementing exactly that in CouchDB. I agree with Per that it wouldn't be difficult to do, we just haven't gotten around to it. TTLs are good enough in some cases but cache invalidation is the only way to go in many.
Name: Joseph A. Williams
Email: joe at joetify.com
More information about the varnish-misc