From user-return-63819-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Sun May 5 17:49:17 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 A8FCE18066B for ; Sun, 5 May 2019 19:49:17 +0200 (CEST) Received: (qmail 49998 invoked by uid 500); 5 May 2019 17:49:14 -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 49987 invoked by uid 99); 5 May 2019 17:49:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 May 2019 17:49:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id A6ADE1810DC for ; Sun, 5 May 2019 17:49:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.58 X-Spam-Level: X-Spam-Status: No, score=0.58 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, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qsn65LYbEZgk for ; Sun, 5 May 2019 17:49:11 +0000 (UTC) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 449535F17B for ; Sun, 5 May 2019 17:49:11 +0000 (UTC) Received: by mail-pf1-f196.google.com with SMTP id l132so528609pfc.8 for ; Sun, 05 May 2019 10:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:message-id :references:in-reply-to:to; bh=6EVlTKc5IYNVYtWvp1B+Yb+/+DOCgC8Ggj6UOY4VVHk=; b=k8P7tyvnNyGlsTY2p3kJCsmiX3x7aYi//MFR4dn1NRR5WraL2nrmTxMaIKmp+pX/o7 +HetfSRL2kCxNoY0kc/N+C5Z1xssUuIbq9+LvTqylKuAvuTYU1HhswPQaDlhUsYu8j09 9p7UUqwNeP6zkTG1qrVaeS9RoeSt5YZbr+yGkzVg1Mzcp3NvQEiOuieE0oH33g+DBdfc SYMnNP3PQ6kOxYL6L3X17x210G6U7mgqMs5Sajpv5N6vKok4WhqlzuRHE/pVk+UDghlg onuWLqyA5smJVDJoaxvuT2zjJpoT/UYTo85s7G3+EIYEccpm9xO5ijBiNyHC6182Wrg2 xcxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:references:in-reply-to:to; bh=6EVlTKc5IYNVYtWvp1B+Yb+/+DOCgC8Ggj6UOY4VVHk=; b=rk0pAG2W7EnNm40cmD+NYlagPHfmCibdPc+ZkGzjnppp2gTYSeh9makK/N1liRTpjc F9JK2NMhdqVaOrLqjMgs5OkvNGPqjeyghv+U15r7iV3KTd4kWSTUHvUsGa6R9eA6CRvQ ofJK2GuIWzO25nuJwOmONucJlUvqWLpfba9WbTZrZOvgTgir8FYle7PIm0oDhvABPcmU +CRBvkIT4ODMI9ByX3taHHzdSEP9NSe40zmRw7l3VahDo8gIvXIGAxpr4gzt8hapcoXQ Ie7Swx7+a/zFJen7fAEGRGz+OiSvjE4IGmx4mtqRpE4xwlOCMZoNnGvf6CmH9fU3KCOQ HLrQ== X-Gm-Message-State: APjAAAVS+pROEspL31Tbbvhb9rQjtpRvHAYAILmxmhmPBLeWFSRbovdB cziL5vCMSa2yiE0a51MuarT+JIt9 X-Google-Smtp-Source: APXvYqwmlACYWiFwILdgqY7IMXpY7Jz6ax7lEE7wd4WI19QqbGkXQP7BZfCePsWyRaw0aAtNbBb6YA== X-Received: by 2002:a63:d10:: with SMTP id c16mr25927492pgl.156.1557078550223; Sun, 05 May 2019 10:49:10 -0700 (PDT) Received: from [192.168.0.49] (97-113-107-191.tukw.qwest.net. [97.113.107.191]) by smtp.gmail.com with ESMTPSA id s198sm17056398pfs.34.2019.05.05.10.49.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 05 May 2019 10:49:09 -0700 (PDT) From: Jeff Jirsa Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Sun, 5 May 2019 10:49:07 -0700 Subject: Re: How to set up a cluster with allocate_tokens_for_keyspace? Message-Id: <510D674A-0137-4105-A628-2DB0BE568921@gmail.com> References: <16a821ed499.af3afa5e29208.9163146459405242974@zoho.com> <16a860b4621.cd08484135022.3733124602199675419@zoho.com> In-Reply-To: To: user@cassandra.apache.org X-Mailer: iPhone Mail (16E227) Picking an ideal allocation for N seed nodes and M vnodes per seed is probab= ly something we should add as a little python script or similar in /tools/ t= o make this easier. Then let the auto allocation stuff kick in after that. > On May 5, 2019, at 8:23 AM, Jon Haddad wrote: >=20 > I mean you'd want to set up the initial tokens for the first 3 nodes > of your cluster, which are usually the seed nodes. >=20 >=20 > On Sat, May 4, 2019 at 8:31 PM onmstester onmstester > wrote: >>=20 >> So do you mean setting tokens for only one node (one of the seed node) is= fair enough? >> I can not see any problem with this mechanism (only one manual token assi= gnment at cluster set up), but the article was also trying to set up a balan= ced cluster and the way that it insist on doing manual token assignment for m= ultiple seed nodes, confused me. >>=20 >> Sent using Zoho Mail >>=20 >>=20 >>=20 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Forwarded message =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D >> From: Jon Haddad >> To: >> Date: Sat, 04 May 2019 22:10:39 +0430 >> Subject: Re: How to set up a cluster with allocate_tokens_for_keyspace? >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Forwarded message =3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D >>=20 >> That line is only relevant for when you're starting your cluster and >> you need to define your initial tokens in a non-random way. Random >> token distribution doesn't work very well when you only use 4 tokens. >>=20 >> Once you get the cluster set up you don't need to specify tokens >> anymore, you can just use allocate_tokens_for_keyspace. >>=20 >> On Sat, May 4, 2019 at 2:14 AM onmstester onmstester >> wrote: >>>=20 >>> I just read this article by tlp: >>> https://thelastpickle.com/blog/2019/02/21/set-up-a-cluster-with-even-tok= en-distribution.html >>>=20 >>> Noticed that: >>>>> We will need to set the tokens for the seed nodes in each rack manuall= y. This is to prevent each node from randomly calculating its own token rang= es >>>=20 >>> But until now, i was using this recommendation to setup a new cluster: >>>>>=20 >>>=20 >>> You'll want to set them explicitly using: python -c 'print( [str(((2**64= / 4) * i) - 2**63) for i in range(4)])' >>>=20 >>>=20 >>> After you fire up the first seed, create a keyspace using RF=3D3 (or wha= tever you're planning on using) and set allocate_tokens_for_keyspace to that= keyspace in your config, and join the rest of the nodes. That gives even >>> distribution. >>>=20 >>> I've defined plenty of racks in my cluster (and only 3 seed nodes), shou= ld i have a seed node per rack and use initial_token for all of the seed nod= es or just one seed node with inital_token would be ok? >>>=20 >>> Best Regards >>>=20 >>>=20 >>=20 >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org >> For additional commands, e-mail: user-help@cassandra.apache.org >>=20 >>=20 >>=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org > For additional commands, e-mail: user-help@cassandra.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@cassandra.apache.org For additional commands, e-mail: user-help@cassandra.apache.org