From user-return-13545-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Sun Nov 07 10:28:54 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 4256 invoked from network); 7 Nov 2010 10:28:54 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Nov 2010 10:28:54 -0000 Received: (qmail 78837 invoked by uid 500); 7 Nov 2010 10:29:24 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 78600 invoked by uid 500); 7 Nov 2010 10:29:21 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 78592 invoked by uid 99); 7 Nov 2010 10:29:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Nov 2010 10:29:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [88.208.121.9] (HELO smtp.arachne.cz) (88.208.121.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Nov 2010 10:29:13 +0000 Received: from [192.168.2.104] (a40-prg1-10-118.static.adsl.vol.cz [88.146.57.118]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.arachne.cz (Postfix) with ESMTPSA id 3C1359814A for ; Sun, 7 Nov 2010 11:28:50 +0100 (CET) Message-Id: From: =?UTF-8?Q?Karel_Mina=C5=99=C3=ADk?= To: user@couchdb.apache.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Couch and Varnish Date: Sun, 7 Nov 2010 11:28:49 +0100 X-Mailer: Apple Mail (2.936) Hello, I'd like to ask if anyone has some experience to share regarding accelerating Couch with Varnish. I think lots of us are doing it, but can't find too much info around. Originally, I thought it would be possible to use ETags with some proper Varnish configuration (eg. "accumulate" concurrent requests and pass only one to the backend, etc), but that seems not to be possible, since Varnish does not pass ETags to the backend [http://lists.varnish-cache.org/pipermail/varnish-misc/2010-November/004997.html ]. As I understand it now, the only way how to cache Couch's response would be with time-based caching, and either using the cached response until it auto-expires, or expire the cached response via PURGE commands. Of course, it would be possible and technically trivial to send purge requests via the _changes feed or via the "update_notification" mechanism. As I see it, the tricky part would be to know which objects to purge, based on individual document changes. Because not only single documents, but also aggregated view results or fulltext queries would get cached. Of course, "there are two hard thing in computer science ...". Has anyone put any thoughts/work into this? Thanks, Karel