From user-return-63811-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Sat May 4 09:14:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 49D79180621 for ; Sat, 4 May 2019 11:14:04 +0200 (CEST) Received: (qmail 52201 invoked by uid 500); 4 May 2019 09:14:00 -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 52191 invoked by uid 99); 4 May 2019 09:14:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 May 2019 09:14:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E31D8C0C92 for ; Sat, 4 May 2019 09:13:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.8 X-Spam-Level: * X-Spam-Status: No, score=1.8 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); domainkeys=pass (768-bit key) header.from=onmstester@zoho.com header.d=zoho.com; dkim=pass (1024-bit key) header.d=zoho.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id nun_G7YDHPfW for ; Sat, 4 May 2019 09:13:56 +0000 (UTC) Received: from sender-pp-o92.zoho.com (sender-pp-092.zoho.com [135.84.80.237]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E5B1E5F1F7 for ; Sat, 4 May 2019 09:13:55 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1556961227; cv=none; d=zoho.com; s=zohoarc; b=irtBzxHU/U9DPIccXHnrHxEIje5iDFo2B/Quu736htytz0GQZ0g+kqa1VK4qeZS5DNPnnW5yETU8MfSccCwmL3kPwoch2UbFh6vxx+IEeAXu8wi2XILyuFhRFojYrxt/zvg+ptz9dWA5FHIk/vPeLrvhUdmKLq0M5YwVJehKshw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556961227; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To:ARC-Authentication-Results; bh=ZoK4L7f9+wQ82NMok5KRudFov2AYtQ2xaUedIWSze68=; b=AQjCmn1Gw4VPL8NDDHg1NZqkC8J2IDoiW1GOj76RebKZXbblOVeUfTESQR9ucXr4a9xjoSFZCGEkTr0ZA6zJ857zD2PTOAJnefzH31/5CqzpegBYY1GU8rWuB+j0Zq7k2FDbunAMR05b3wKtNeWI6Dd29J6A8fzD5dEp1+pj2qA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=onmstester@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:message-id:in-reply-to:subject:mime-version:content-type:user-agent; b=tEVOxvReFKCN4uAkh/8WEIzSkOJcdWmjs14JR3PB/ErOg+k6p/CIe3gocYy1sMtmd+8iE6MtsQsD ZcrwRTY92iFHD8wCVC4anB/GgFn9Iwaei677QtRa+gkxaQskXHn9 Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1556961219739718.5879708683817; Sat, 4 May 2019 02:13:39 -0700 (PDT) Received: from [185.125.204.115] by mail.zoho.com with HTTP;Sat, 4 May 2019 02:13:39 -0700 (PDT) Date: Sat, 04 May 2019 13:43:39 +0430 From: onmstester onmstester To: "user" Message-Id: <16a821ed499.af3afa5e29208.9163146459405242974@zoho.com> In-Reply-To: Subject: How to set up a cluster with allocate_tokens_for_keyspace? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_79336_171616029.1556961219737" X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail ------=_Part_79336_171616029.1556961219737 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I just read this article by tlp: https://thelastpickle.com/blog/2019/02/21/set-up-a-cluster-with-even-token-= distribution.html =C2=A0 Noticed that: >>We will need to set the tokens for the seed nodes in each rack manually. = This is to prevent each node from randomly calculating its own token ranges =C2=A0But until now, i was using this recommendation to setup a new cluster= : >> You'll want to set them explicitly using: python -c 'print( [str(((2**64 / = 4) * i) - 2**63) for i in range(4)])' After you fire up the first seed, create a keyspace using RF=3D3 (or whatev= er you're planning on using) and set allocate_tokens_for_keyspace to that k= eyspace in your config, and join the rest of the nodes. That gives even distribution. I've defined plenty of racks in my cluster (and only 3 seed nodes), should = i have a seed node per rack and use initial_token for all of the seed nodes= or just one seed node with inital_token would be ok? Best Regards ------=_Part_79336_171616029.1556961219737 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
I just read this article by tlp:
https://thelastpickle.com/blog= /2019/02/21/set-up-a-cluster-with-even-token-distribution.html
 
Noticed that:
>>We will need to set the tokens f= or the seed nodes in each rack manually. This is to prevent each node from = randomly calculating its own token ranges

 But until now, i was using this recommendatio= n to setup a new cluster:
>>
You'll want to set them explici=
tly using: python -c 'print( [str(((2**64 / 4) * i) - 2**63) for i in range=
(4)])'


After you fire up the first seed, create a keyspace using RF=3D3 (or whatev=
er you're planning on using) and set allocate_tokens_for_keyspace to that k=
eyspace in your config, and join the rest of the nodes. That gives even
distribution.

I've defined plenty of ra= cks in my cluster (and only 3 seed nodes), should i have a seed node per ra= ck and use initial_token for all of the seed nodes or just one seed node wi= th inital_token would be ok?

Best Regards


------=_Part_79336_171616029.1556961219737--