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 299A96A7E for ; Tue, 2 Aug 2011 13:21:40 +0000 (UTC) Received: (qmail 46407 invoked by uid 500); 2 Aug 2011 13:21:37 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 46110 invoked by uid 500); 2 Aug 2011 13:21:36 -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 46102 invoked by uid 99); 2 Aug 2011 13:21:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2011 13:21:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of thong@acunu.com designates 209.85.210.48 as permitted sender) Received: from [209.85.210.48] (HELO mail-pz0-f48.google.com) (209.85.210.48) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2011 13:21:31 +0000 Received: by pzk32 with SMTP id 32so14884881pzk.35 for ; Tue, 02 Aug 2011 06:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acunu.com; s=google; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=kDq4+jvEQrshT3W/i5z8HLRrImA8GzE6Udsxd68KVqY=; b=M5/mwID5sJrH1wKpRV0LyYFKpaY5xB2pYkb3zGIb5sWQdGRPzjqxStCNdGlINB+OJK sm/re8smmTAJy48jocgAMkVfN8kP6pnsP/ID6wFHWNcg/qQtt+1k/+9oPaaFlDjpZohT mdEbLWfgMaP5BPcHjc7/QGOTpvIVE3RPoLlAA= Received: by 10.68.15.67 with SMTP id v3mr7001201pbc.5.1312291270508; Tue, 02 Aug 2011 06:21:10 -0700 (PDT) MIME-Version: 1.0 Sender: thong@acunu.com Received: by 10.143.18.12 with HTTP; Tue, 2 Aug 2011 06:20:50 -0700 (PDT) In-Reply-To: References: <1312066348.23385.YahooMailNeo@web130113.mail.mud.yahoo.com> <1312158262.30835.YahooMailNeo@web130111.mail.mud.yahoo.com> From: Theodore Hong Date: Tue, 2 Aug 2011 14:20:50 +0100 X-Google-Sender-Auth: Z7QovpGbPikKXE-_ZM6tYUTkx-o Message-ID: Subject: Fwd: How tokens work? To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Rafael Almeida wrote: > I find it hard to explain that without an example. So, let's say the toke= n space > is actually from 0 to 100 and we have 4 nodes (let's do this in order to = make > things more manageble). In our example, we have the following initial_tok= ens: > > node A =3D 0 > node B =3D 20 > node C =3D 70 > node D =3D 90 > > Node A would have 0 - 20 tokens assigned to it (20/100 =3D 20% of the loa= d). =A0Node > B would have 70 - 20 =3D 50 tokens assigned to it (50% of the load). Node= C would > have 90 - 70 =3D 20 tokens assigned to it (20% of the load) and, finally,= node D > would have 10% of the tokens assigned to it. See how that works? That's the general idea, but confusingly, the node's token gives the LAST key that it is responsible for, not the first. =A0So in your example the ranges would be: node A =3D 91 through 0 (10%) node B =3D 1 through 20 (20%) node C =3D 21 through 70 (50%) node D =3D 71 through 90 (20%) theo