Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 29510 invoked from network); 12 Apr 2011 16:14:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 16:14:22 -0000 Received: (qmail 33167 invoked by uid 500); 12 Apr 2011 16:14:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 33141 invoked by uid 500); 12 Apr 2011 16:14:20 -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 33133 invoked by uid 99); 12 Apr 2011 16:14:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 16:14:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jonathan.colby@gmail.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bw0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 16:14:11 +0000 Received: by bwz13 with SMTP id 13so6335106bwz.31 for ; Tue, 12 Apr 2011 09:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to :x-mailer; bh=j1tsiSE5RDrKscd2sDQItJBexR+S1qVKljyDtbAAA8M=; b=o7AmH6wXPeUZMrwSTtU1eLgw/jvIq2TZU8/mYW1Qh3LjnG5/9fHyYCXoOl2J9jJwDB BArdE2hIg/B42UiJk88SRIynZMcfEinf20cknH/P5C9qyIqUT0FXp4QI+wlBGorEtGDS tnG/Txwj5UA5T01uXIRRXJXV9naLELFJ0TQQU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=HRySesNP5QP03/X5hNPuQ9ijWwLLcVBjuPQEaSgp6EysBsOXdwJSileZxPVcxUr8BK kfZr9VToxj0EbEmnGKcQVnQvrWEkfX7PfZRmifSEA4/1vgOSKT3+TtwefZKIqZKZLwvZ ibJGhBtyn1TQq2HOAWGOZyDr46TwKMZd0KZi4= Received: by 10.204.3.196 with SMTP id 4mr1343760bko.188.1302624831553; Tue, 12 Apr 2011 09:13:51 -0700 (PDT) Received: from siteop-12.mobile.rz ([194.50.70.51]) by mx.google.com with ESMTPS id t1sm3953824bkx.19.2011.04.12.09.13.49 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Apr 2011 09:13:50 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Cassandra 2 DC deployment From: Jonathan Colby In-Reply-To: Date: Tue, 12 Apr 2011 18:13:48 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <507C0802-76CD-4FA3-96AF-CD94C6FAA5C6@gmail.com> References: To: user@cassandra.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org When the down data center comes back up, the Quorum reads will result in = a read-repair, so you will get valid data. Besides that, hinted = handoff will take care of getting data replicated to a previously down = node. You're example is a little unrealistic because you could theoretically = have a DC with only one node. So CL.ONE would work every time. But if = you have more than 1 node, you have to decide if your application can = tolerate getting "NULL" for a read if the write hasn't propagated from = the responsible node to the replica. disclaimer: I'm a cassandra novice. On Apr 12, 2011, at 5:12 PM, Raj N wrote: > Hi experts, > We are planning to deploy Cassandra in 2 datacenters. Let assume = there are 3 nodes, RF=3D3, 2 nodes in 1 DC and 1 node in 2nd DC. Under = normal operations, we would read and write at QUORUM. What we want to do = though is if we lose a datacenter which has 2 nodes, DC1 in this case, = we want to downgrade our consistency to ONE. Basically I am saying that = whenever there is a partition, then prefer availability over = consistency. In order to do this we plan to catch UnavailableException = and take corrective action. So try QUORUM under normal circumstances, if = unavailable try ONE. My questions - > Do you guys see any flaws with this approach?=20 > What happens when DC1 comes back up and we start reading/writing at = QUORUM again? Will we read stale data in this case? >=20 > Thanks > -Raj