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 E54759A14 for ; Fri, 1 Jun 2012 19:00:04 +0000 (UTC) Received: (qmail 19619 invoked by uid 500); 1 Jun 2012 19:00:02 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 19590 invoked by uid 500); 1 Jun 2012 19:00:02 -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 19582 invoked by uid 99); 1 Jun 2012 19:00:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 19:00:02 +0000 X-ASF-Spam-Status: No, hits=2.6 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,TRACKER_ID X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chongz.zhang@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2012 18:59:56 +0000 Received: by werb13 with SMTP id b13so1803413wer.31 for ; Fri, 01 Jun 2012 11:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=AQo0QUoUUC9dP6eo3IHOIsz+02xFRmlPfr9L/q82Svw=; b=bgQGtKeADUxIYGlcE1AK65k0bdleK4jPNEPNBJNVAyO635qCZmO7PAdtCikEvQ5Vug bFvndwKVK+S2IAAxyCWft5KGp66ymZCrs+7q8ezB5WksMwa3ssAnvliQfQtr+VSUT7hk /uWqCaJh5qhyQDj/HlKw7elyyWT1rNZMOPav8+Kfy9j/h3EWjrajGrNDx/Thtn3F6/Jr fhQ+wsBb3vh4M8DMHHKL9jumuShCz2zZObMVTuvJLL6ahzfqOINYWsawzqvB0+U5M81Q DRv4MixgryX5jrZvWh0bz99XkaC5AClEO8Kz92MjsT/OoyBlufbHJxPfgLnHZRbbQ3Qb rLxg== MIME-Version: 1.0 Received: by 10.216.142.194 with SMTP id i44mr3007775wej.88.1338577172857; Fri, 01 Jun 2012 11:59:32 -0700 (PDT) Received: by 10.180.7.231 with HTTP; Fri, 1 Jun 2012 11:59:32 -0700 (PDT) In-Reply-To: <73238C02-231E-408A-BC4A-D9BB4AED0496@thelastpickle.com> References: <88A585A2-F5BF-4A6B-9DF3-E5450A52763F@thelastpickle.com> <73238C02-231E-408A-BC4A-D9BB4AED0496@thelastpickle.com> Date: Fri, 1 Jun 2012 14:59:32 -0400 Message-ID: Subject: Re: tokens and RF for multiple phases of deployment From: Chong Zhang To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e6d99a92e4833704c16dc856 --0016e6d99a92e4833704c16dc856 Content-Type: text/plain; charset=ISO-8859-1 I followed the doc to add the new node. After the nodetool repair, the 'Load' on the new node in DC2 increased to 250M. But the 'Owns' col are still 50%, 50%, 0%, and I guess it's OK because the new token value is 1? Thanks, Chong On Thu, May 31, 2012 at 9:52 PM, aaron morton wrote: > The ring (2 in DC1, 1 in DC2) looks OK, but the load on the new node in > DC2 is almost 0%. > > yeah, thats the way it will look. > > But all the other rows are not in the new node. Do I need to copy the data > files from a node in DC1 to the new node? > > How did you add the node ? (see > http://www.datastax.com/docs/1.0/operations/cluster_management#adding-nodes-to-a-cluster > ) > > if in doubt run nodetool repair on the new node. > > Cheers > > > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 1/06/2012, at 3:46 AM, Chong Zhang wrote: > > Thanks Aaron. > > I might use LOCAL_QUORUM to avoid the waiting on the ack from DC2. > > Another question, after I setup a new node with token +1 in a new DC, and > updated a CF with RF {DC1:2, DC2:1}. When i update a column on one node in > DC1, it's also updated in the new node in DC2. But all the other rows are > not in the new node. Do I need to copy the data files from a node in DC1 to > the new node? > > The ring (2 in DC1, 1 in DC2) looks OK, but the load on the new node in > DC2 is almost 0%. > > Address DC Rack Status State Load > Owns Token > > 85070591730234615865843651857942052864 > 10.10.10.1 DC1 RAC1 Up Normal 313.99 MB > 50.00% 0 > 10.10.10.3 DC2 RAC1 Up Normal 7.07 MB > 0.00% 1 > 10.10.10.2 DC1 RAC1 Up Normal 288.91 MB > 50.00% 85070591730234615865843651857942052864 > > Thanks, > Chong > > On Thu, May 31, 2012 at 5:48 AM, aaron morton wrote: > >> >> Could you provide some guide on how to assign the tokens in this growing >> deployment phases? >> >> >> background >> http://www.datastax.com/docs/1.0/install/cluster_init#calculating-tokens-for-a-multi-data-center-cluster >> >> Start with tokens for a 4 node cluster. Add the next 4 between between >> each of the ranges. Add 8 in the new DC to have the same tokens as the >> first DC +1 >> >> Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write >> and LOCAL_QUORUM for read, can the read also reach to the 2nd cluster? >> >> No. It will fail if there are not enough nodes available in the first DC. >> >> We'd like to keep both write and read on the same cluster. >> >> Writes go to all replicas. Using EACH_QUORUM means the client in the >> first DC will be waiting for the quorum from the second DC to ack the >> write. >> >> >> Cheers >> ----------------- >> Aaron Morton >> Freelance Developer >> @aaronmorton >> http://www.thelastpickle.com >> >> On 31/05/2012, at 3:20 AM, Chong Zhang wrote: >> >> Hi all, >> >> We are planning to deploy a small cluster with 4 nodes in one DC first, >> and will expend that to 8 nodes, then add another DC with 8 nodes for fail >> over (not active-active), so all the traffic will go to the 1st cluster, >> and switch to 2nd cluster if the whole 1st cluster is down or >> on maintenance. >> >> Could you provide some guide on how to assign the tokens in this growing >> deployment phases? I looked at some docs but not very clear on how to >> assign tokens on the fail-over case. >> Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write >> and LOCAL_QUORUM for read, can the read also reach to the 2nd cluster? >> We'd like to keep both write and read on the same cluster. >> >> Thanks in advance, >> Chong >> >> >> > > --0016e6d99a92e4833704c16dc856 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I followed the doc to add the new node. After the nodetool repair, the '= ;Load' on the new node in DC2 increased to 250M. But the 'Owns'= col are still 50%, 50%, 0%, and I guess it's OK because the new token = value is 1?

Thanks,
Chong
On Thu, May 31, 2012 at= 9:52 PM, aaron morton <aaron@thelastpickle.com> wrote= :
The ring (2 in DC1, 1 in DC2) look= s OK, but the load on the new node in DC2 is almost 0%.
yeah, thats the way it will look.=A0

But = all the other rows are not in the new node. Do I need to copy the data file= s from a node in DC1 to the new node?

if in doubt run nodetool repair on the new node.=A0

Cheers


<= div style=3D"word-wrap:break-word">
-----------------
Aaron Morton
Freelance Deve= loper
@aaronmorton

On 1/06/2012, at 3:46 AM, Chong = Zhang wrote:

Thanks Aaron.

I might use LOCAL_QUORUM to avoid the waiting on the ack from DC2.

Another question, after I setup a new node with token += 1 in a new DC, =A0and updated a CF with RF {DC1:2, DC2:1}. When i update a = column on one node in DC1, it's also updated in the new node in DC2. Bu= t all the other rows are not in the new node. Do I need to copy the data fi= les from a node in DC1 to the new node?

The ring (2 in DC1, 1 in DC2) looks OK, but the load on= the new node in DC2 is almost 0%.

Address = =A0 =A0 =A0 =A0 DC =A0 =A0 =A0 =A0 =A0Rack =A0 =A0 =A0 =A0Status State =A0 = Load =A0 =A0 =A0 =A0 =A0 =A0Owns =A0 =A0Token =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A085070591730234615865843651857942052864 =A0 =A0 =A0
10.10.10.1 =A0 =A0DC1 =A0 =A0 =A0 =A0 RAC1 =A0 =A0 =A0 =A0Up =A0 =A0 Norm= al =A0313.99 MB =A0 =A0 =A0 50.00% =A00 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
10.10.10.3 =A0 =A0DC2 =A0 =A0 =A0 =A0 RAC1 =A0 =A0 =A0 =A0Up =A0 =A0 N= ormal =A07.07 MB =A0 =A0 =A0 =A0 =A0 0.00% =A0 1 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0
10= .10.10.2 =A0 =A0DC1 =A0 =A0 =A0 =A0 RAC1 =A0 =A0 =A0 =A0Up =A0 =A0 Normal = =A0288.91 MB =A0 =A0 =A0 50.00% =A085070591730234615865843651857942052864 = =A0 =A0 =A0

Thanks,
Chong

On Thu, May 31, 2012 at 5:48 AM, aaron morton &l= t;aaron@thelas= tpickle.com> wrote:

Could you provide some guide on how to assign the tokens in thi= s growing deployment phases?=A0

background=A0ht= tp://www.datastax.com/docs/1.0/install/cluster_init#calculating-tokens-for-= a-multi-data-center-cluster

Start with tokens for a 4 node cluster. Add the next 4 = between between each of the ranges. Add 8 in the new DC to have the same to= kens as the first DC +1

Also if we use the same RF (3) in both DC, and use=A0EACH_QUORUM for write and=A0LOCAL_QUORUM f= or read, can the read also reach to the 2nd cluster?
No. It will fail if there are not enough nodes available= in the first DC.=A0

We'd like to keep both write and read on the same cl= uster.
Writes go to all replicas. Using EACH_QUORUM means the c= lient in the first DC will be waiting for the quorum from the second DC to = ack the write.=A0


Cheers
<= div style=3D"word-wrap:break-word">
-----------------
Aaron Morton
Freelance Deve= loper
@aaronmorton

On 31/05/2012, at 3:20 AM, Chong Zhang wrote:

Hi all,

We are planning to deploy a = small cluster with 4 nodes in one DC first, and will expend that to 8 nodes= , then add another DC with 8 nodes for fail over (not active-active), so al= l the traffic will go to the 1st cluster, and switch to 2nd cluster if the = whole 1st cluster is down or on=A0maintenance.=A0

Could you provide some guide on how to assign the token= s in this growing deployment phases? I looked at some docs but not very cle= ar on how to assign tokens on the fail-over case.
Also if we use = the same RF (3) in both DC, and use=A0EACH_Q= UORUM for write and=A0LOCAL_QUORUM for read, can the rea= d also reach to the 2nd cluster? We'd like to keep both write and read = on the same cluster.

Thanks in advance,
Chong



--0016e6d99a92e4833704c16dc856--