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 33B04D64D for ; Sun, 9 Sep 2012 09:10:09 +0000 (UTC) Received: (qmail 77043 invoked by uid 500); 9 Sep 2012 09:10:06 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 76607 invoked by uid 500); 9 Sep 2012 09:10:04 -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 76587 invoked by uid 99); 9 Sep 2012 09:10:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2012 09:10:04 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stryuber@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Sep 2012 09:09:58 +0000 Received: by ieak13 with SMTP id k13so1511769iea.31 for ; Sun, 09 Sep 2012 02:09:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=no86pUbGct9B/KreCXwwVLZV3UEEa4NcW0fGgrqUxW0=; b=RpjYV1ECfE7p+CHuUhVlWZBt5tBYVGcNpCc/+JiQ8w6dZrKFA4TsRFW1XY3geFooNK ExhRFeSnfo2Cb5P8MsA4ABZyTgtMx4bA9rVfZ+jO3YufqOtHa2AEVpabNF5hqqiPiew6 2lvf9sdCQahPy4aKWjoOJ5WVg5RP5mz/07WOrpJ6LzZwzNSS67Y+ahraFR+Q6TdvZQzO Tg+CSFn3yGmBuLFJam0e4q7euRcK2pxrm/Gr/SmAE+wzcmzOW3la9IWxZ0eOiPLqicuK fqWP8KdX1n6VC5NghIicbkFif1AV7MFJvl3gEE1lTWN4VgwlFCvtJTPlZUXSS1E4kOaP 1f4Q== Received: by 10.50.36.169 with SMTP id r9mr6279205igj.19.1347181777386; Sun, 09 Sep 2012 02:09:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.161.136 with HTTP; Sun, 9 Sep 2012 02:09:17 -0700 (PDT) In-Reply-To: References: From: Sergey Tryuber Date: Sun, 9 Sep 2012 13:09:17 +0400 Message-ID: Subject: Replication factor 2, consistency and failover To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=14dae934032b49fb8804c94133d5 X-Virus-Checked: Checked by ClamAV on apache.org --14dae934032b49fb8804c94133d5 Content-Type: text/plain; charset=UTF-8 Hi We have to use Cassandra with RF=2 (don't ask why...). There are two datacenters (RF=2 in each datacenter). Also we use Astyanax as a client library. In general we want to achieve strong consistency. Read performance is important for us, that's why we perform writes with LOCAL_QUORUM and reads with ONE. If one server is down, we automatically switch to Writes.ONE, Reads.ONE only for that replica which has failed node (we modified Astyanax to achieve that). When the server comes back, we turn back Writes.LOCAL_QUORUM and Reads.ONE, but, of course, we see some inconsistencies during the switching process and some time after (when hinted handnoff works). Basically I don't have any questions, just want to share our "ugly" failover algorithm, to hear your criticism and may be advise on how to improve it. Unfortunately we can't change replication factor and most of the time we have to read with consistency level ONE (because we have strict requirements on read performance). Thank you! --14dae934032b49fb8804c94133d5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi

We have to use Cassandra with RF=3D2 (= don't ask why...). There are two datacenters (RF=3D2 in each datacenter= ). Also we use Astyanax as a client library. In general we want to achieve = strong consistency. Read performance is important for us, that's why we= perform writes with LOCAL_QUORUM and reads with ONE. If one server is down= , we automatically switch to Writes.ONE, Reads.ONE only for that replica wh= ich has failed node (we modified Astyanax to achieve that). When the server= comes back, we turn back Writes.LOCAL_QUORUM and Reads.ONE, but, of course= , we see some inconsistencies during the switching process and some time af= ter (when hinted handnoff works).

Basically I don't have any questions, just want to share our "= ugly" failover algorithm, to hear your criticism and may be advise on = how to improve it. Unfortunately we can't change replication factor and= most of the time we have to read with consistency level ONE (because we ha= ve strict requirements on read performance).

Thank you!

--14dae934032b49fb8804c94133d5--