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 9EAAD855D for ; Tue, 16 Aug 2011 21:20:10 +0000 (UTC) Received: (qmail 91806 invoked by uid 500); 16 Aug 2011 21:20:08 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 91729 invoked by uid 500); 16 Aug 2011 21:20:07 -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 91721 invoked by uid 99); 16 Aug 2011 21:20:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 21:20:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of oleg.tsvinev@gmail.com designates 209.85.161.44 as permitted sender) Received: from [209.85.161.44] (HELO mail-fx0-f44.google.com) (209.85.161.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Aug 2011 21:20:02 +0000 Received: by fxe6 with SMTP id 6so280840fxe.31 for ; Tue, 16 Aug 2011 14:19:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=8Kt+2twwSObwIY9hJlPpXfkQcpFGdFGzal3IwQL3mZ0=; b=CTClBrpW505fbxxF+0ueWdM2lhDhY0fXZ8Y0OtDi3OaAUAfwIoogGdpaed8EB0KHSw N8Sy8hqpBxW1SngjklOmlvfuy+jkuxIKTAo7+eX8hOsu4wnhGplIJ9ogeUtoMY5ENsPc tXMlW6o2mbCbIsTT1qsY5nIwwqvyWbW4Ir0S0= Received: by 10.223.62.82 with SMTP id w18mr224691fah.121.1313529581102; Tue, 16 Aug 2011 14:19:41 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.113.78 with HTTP; Tue, 16 Aug 2011 14:19:21 -0700 (PDT) In-Reply-To: References: From: Oleg Tsvinev Date: Tue, 16 Aug 2011 14:19:21 -0700 Message-ID: Subject: Re: Cassandra in Multiple Datacenters Active - Standby configuration To: Cassandra Users , hector-users@googlegroups.com Cc: Oleg Tsvinev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, I followed instructions here: http://wiki.apache.org/cassandra/Operations#Token_selection to create a Cassandra cluster spanning two datacenters. Now I see that nodes belonging to DC2 datacenter own 0% of the ring. I would expect them to own 50%. Does anyone have an idea what's going on here? root@casper02:~# nodetool -h 10.4.64.63 ring Address DC Rack Status State Load Owns Token 85070591730234615865843651857942052865 10.4.64.63 DC1 RAC1 Up Normal 36.19 MB 50.00% 0 10.4.65.55 DC2 RAC1 Up Normal 36.21 MB 0.00% 1 10.4.65.73 DC1 RAC1 Up Normal 530.12 KB 50.00% 85070591730234615865843651857942052864 10.4.64.166 DC2 RAC1 Up Normal 525.68 KB 0.00% 85070591730234615865843651857942052865 Thank you, Oleg ------------- On Mon, Aug 15, 2011 at 1:39 PM, Oleg Tsvinev wrot= e: > Hi all, > > I have a question that documentation=C2=A0has not clear answer for. I hav= e > the following requirements: > > 1. Synchronously store data in datacenter DC1 on 2+ nodes > 2. Asynchronously replicate the same data to DC2 and store it on 2+ > nodes to act as a hot standby > > Now, I have configured keyspaces with o.a.c.l.NetworkTopologyStrategy > with strategy_options=3D[{DC1:2, DC2:2}] and use LOCAL_QUORUM > consistency level, following documentation here: > http://www.datastax.com/docs/0.8/operations/datacenter > > Now, how do I assign initial tokens? If I have, say 6 nodes total, 3 > in DC1 and 3 in DC2, and create a ring as if all 6 nodes share the > total 2^128 space equally. > Now say node N1:DC2 has key K and is in remote datacenter (for an app > in DC1). Wouldn't Cassandra always forward K to the DC2 node N1 thus > turning asynchronous writes into synchronous ones? Performance impact > will be huge as the latency between DC1 and DC2 is significant. > > I hope there's an answer and I'm just missing something. My case falls > under Disaster Recovery in > http://www.datastax.com/docs/0.8/operations/datacenter but I don't see > how Cassandra will support my use case. > > I appreciate any help on this. > > Thank you, > =C2=A0Oleg >