Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6C450FB0A for ; Tue, 23 Apr 2013 20:07:28 +0000 (UTC) Received: (qmail 27273 invoked by uid 500); 23 Apr 2013 20:07:26 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 27235 invoked by uid 500); 23 Apr 2013 20:07:26 -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 27227 invoked by uid 99); 23 Apr 2013 20:07:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 20:07:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 209.85.219.49 as permitted sender) Received: from [209.85.219.49] (HELO mail-oa0-f49.google.com) (209.85.219.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Apr 2013 20:07:21 +0000 Received: by mail-oa0-f49.google.com with SMTP id j1so969024oag.36 for ; Tue, 23 Apr 2013 13:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=6bKnvoFYXYx7jMnfxBfi9/XhnKmer1ONZewu4Y8ALdU=; b=MN3vmmg4yq0XMU7iuG5HuLMbOclWYLjEDgzfnX/+FEHDYyky16EHjfBizV9hcYrJjd lEk9KxBb034apOw5Hpme2K0FJHv4gmptRNkkcrc/qr4NhYG07f/FzlrMP359jnBRo7yZ gG+l0dnk7EVWPj42ij3gWfZCHS4565uPreiOP/bI3S88PnHc0gKCZK7axOdAeqT4o6Xq QXDyDOemQHoKWmwOp7Z/RtJggZgp8xWTkdNu4y3ISvOhxFvJuAwOEniSy/+KUdXZNvva A8zkF36a0syZCL3kKcisw0m0jx8PHH/ijWC3kYtYR3SvKv+DZ/E2h/yhhQ3X1/ZHy8FK OBaQ== X-Received: by 10.60.162.71 with SMTP id xy7mr12632476oeb.88.1366747620473; Tue, 23 Apr 2013 13:07:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.160.194 with HTTP; Tue, 23 Apr 2013 13:06:20 -0700 (PDT) In-Reply-To: <55CCE097-9D63-4E28-8873-698AB57822E8@van-cuijk.nl> References: <55CCE097-9D63-4E28-8873-698AB57822E8@van-cuijk.nl> From: Paul Davis Date: Tue, 23 Apr 2013 15:06:20 -0500 Message-ID: Subject: Re: Questions on durability To: "user@couchdb.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Apr 23, 2013 at 2:37 PM, Mark van Cuijk wrote: > Hi, > > For a new project, we're considering CouchDB as an interesting candidate for storage, mainly because of the good durability properties, support for replication and the continuous changes feed. > > Regarding durability I have three questions. I found the durability matrix on the wiki, but the page isn't finished yet. Our setup will be a single client writing to a single CouchDB server, which is replicated to several other CouchDB servers. > > 1. Can I access the continuous changes feed on each of the servers and will those feeds serve the same events in the same order? Yes to the first half. Individual nodes will have their own changes feeds which you can listen to. To the second half, you shouldn't rely on that. While its possible that it appears to work in some circumstances its not at all guaranteed. I'd have to go back and look but I think even if you had a read-only slave, the worker pools in replication don't guarantee the exact ordering of updates. > 2. Will each server only send events to the changes feed after the data is durably persisted to hardware storage? Assuming you turn of delayed_commits and don't disable the fsyncs before and after header writes, then yes you're guaranteed to be reading changes from an MVCC snapshot which (given a proper config) would be guaranteed to be on disk. > 3. The batch=ok parameter influences the response to the writing client, but does it have any influence regarding the answer to the previous question? > No. batch=ok is more or less a fire-and-forget approach to writing documents. The client basically gets a notification that the document parsed ok but has not yet been written. The changes feed still won't see it till it gets through the database updater process which is exactly the same process as above. Although it is important to note that batch=ok means the client could see a 202 (IIRC) "successful" response and that write may never make it to the _changes feed if CouchDB crashes at just the right time. > Thanks, > Mark