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 8BBFA7AA0 for ; Wed, 17 Aug 2011 14:59:13 +0000 (UTC) Received: (qmail 76765 invoked by uid 500); 17 Aug 2011 14:59:11 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 76700 invoked by uid 500); 17 Aug 2011 14:59:10 -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 76689 invoked by uid 99); 17 Aug 2011 14:59:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2011 14:59:10 +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 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; Wed, 17 Aug 2011 14:59:04 +0000 Received: by fxe6 with SMTP id 6so758870fxe.31 for ; Wed, 17 Aug 2011 07:58:44 -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 :content-type:content-transfer-encoding; bh=WfbV1ncOR+lmRUXUm7yAHGVUPA35OZbnjBt7+JAdn30=; b=env0Wa0ua+Qoutpkg4FQ7nTjuIdHA7BEfzn44CrL9SR9b1NtxBhJT3kgoK2aRKNMrS oMiukBooL+JsxuD7rAcOWhAICjmECG3+pfnX7zYSK35IKMff9hy8Y0uoOKV2nXpyfADs VPVyCiJxEz9xYK72b1rZEyLtDTXhoVP8o6X7o= Received: by 10.223.159.137 with SMTP id j9mr1557790fax.64.1313593124100; Wed, 17 Aug 2011 07:58:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.113.78 with HTTP; Wed, 17 Aug 2011 07:58:24 -0700 (PDT) In-Reply-To: <07F7E832-F7CB-4E93-A67C-C2006050B9C5@thelastpickle.com> References: <07F7E832-F7CB-4E93-A67C-C2006050B9C5@thelastpickle.com> From: Oleg Tsvinev Date: Wed, 17 Aug 2011 07:58:24 -0700 Message-ID: Subject: Re: Cassandra in Multiple Datacenters Active - Standby configuration To: user@cassandra.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Aaron, Can you point to a line in Cassandra sources where you believe it does not understand the "multi ring" approach? I'm not sure about Cassandra team but Hector team likes pull requests with patches. Anyways, I believe I should run a test to see if data is indeed replicated between datacenters. And I voted on the issue. On Wed, Aug 17, 2011 at 2:20 AM, aaron morton wro= te: > > The calculation for ownership does not understand the "multi ring" approa= ch to assigning tokens. I've created=C2=A0https://issues.apache.org/jira/br= owse/CASSANDRA-3047=C2=A0for you. > Otherwise your tokens look good to me. > Cheers > ----------------- > Aaron Morton > Freelance Cassandra Developer > @aaronmorton > http://www.thelastpickle.com > On 17/08/2011, at 9:19 AM, Oleg Tsvinev wrote: > > 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 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0DC =C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Rack =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0Status State =C2=A0=C2=A0Load > Owns =C2=A0=C2=A0=C2=A0Token > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A08507059173023461586584365185794= 2052865 > 10.4.64.63 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0DC1 =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0RAC1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Up =C2= =A0=C2=A0=C2=A0=C2=A0Normal =C2=A036.19 MB > 50.00% =C2=A00 > 10.4.65.55 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0DC2 =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0RAC1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Up =C2= =A0=C2=A0=C2=A0=C2=A0Normal =C2=A036.21 MB > 0.00% =C2=A0=C2=A01 > 10.4.65.73 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0DC1 =C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0RAC1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Up =C2= =A0=C2=A0=C2=A0=C2=A0Normal =C2=A0530.12 KB > 50.00% =C2=A085070591730234615865843651857942052864 > 10.4.64.166 =C2=A0=C2=A0=C2=A0=C2=A0DC2 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0RAC1 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0Up =C2=A0=C2= =A0=C2=A0=C2=A0Normal =C2=A0525.68 KB > 0.00% =C2=A0=C2=A085070591730234615865843651857942052865 > > Thank you, > =C2=A0Oleg > > ------------- > > On Mon, Aug 15, 2011 at 1:39 PM, Oleg Tsvinev wr= ote: > > 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 > >