Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-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 1CF747E7D for ; Fri, 28 Oct 2011 09:46:25 +0000 (UTC) Received: (qmail 91459 invoked by uid 500); 28 Oct 2011 09:46:23 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 91439 invoked by uid 500); 28 Oct 2011 09:46:23 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 91431 invoked by uid 99); 28 Oct 2011 09:46:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2011 09:46:23 +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 scode@scode.org designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2011 09:46:14 +0000 Received: by wwe6 with SMTP id 6so4546373wwe.25 for ; Fri, 28 Oct 2011 02:45:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.134.93 with SMTP id r71mr698831wei.59.1319795154278; Fri, 28 Oct 2011 02:45:54 -0700 (PDT) Sender: scode@scode.org Received: by 10.216.26.149 with HTTP; Fri, 28 Oct 2011 02:45:54 -0700 (PDT) X-Originating-IP: [94.234.170.50] In-Reply-To: <4EAA76DF.5030405@sitevision.se> References: <4EAA76DF.5030405@sitevision.se> Date: Fri, 28 Oct 2011 11:45:54 +0200 X-Google-Sender-Auth: i3y0C8AAVguAz6RmLYCCzd4zRNI Message-ID: Subject: Re: CL - locally consistent ONE From: Peter Schuller To: user@cassandra.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org > I've patched the classes WriteResponseHandler and ReadCallback to make sure > that the local node has returned before sending the condition signal. Can > anyone see any drawbacks with this approach? I realize this will only work > as long as the replication factor is the same as the number of nodes, but > that is ok for our scenario. So the "local" node is the co-ordinator. Is it the case that each CMS instance (with embedded cassandra) is always using "itself" as the co-ordinator, and that the requirement you have is that *that particular CMS instance* must see it's *own* writes? And the reason you are using RF=number of nodes is that you're wanting to make sure data is always on the local node? If that is true, it *seems* to me it should work *kind of* as long as the CMS instances never ever use another Cassandra node *and* as long as you accept that a write may disappear in case of a sudden node failure (as usual with CL.ONE). I do think it feels like a fragile approach though, that would be nice to avoid if possible/realistic. I am curious as to performance though. It seems a lot safer to just use QUORUM *at least* for writes; keep in mind that regardless of CL.ONE your writes till go to all the other replicas (in this case all nodes since you say you have RF = cluster size) so in terms of throughput using CL.ONE should not be faster. It should be a bit better for latency in the common case though (which might translate to throughput for a sequential user). If you can do writes on QUORUM at least, even if not reads, you also avoid the problem of an acknowledged write disappearing in case of node failures. Are you in a position where the nodes in the cluster are wide apart (e.g. different DC:s), for the writes to be a significant problem for latency? -- / Peter Schuller (@scode, http://worldmodscode.wordpress.com)