cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plotnik, Alexey" <aplot...@rhonda.ru>
Subject Re: Question about adding nodes to a cluster
Date Tue, 10 Feb 2015 01:08:25 GMT
Yes, Cassandra partitioner is based on hash ring. Doubling number of nodes is the best cluster
exctending policy I've ever seen, because it's zero-overhead.

Hashring - you get MD5 max (2^128-1), divide it by number of nodes (partitions) getting N
points and then evenly distribute them across you ring. You can open Python script you used
to generate the following output ans see how it works.



I am on Cassandra 1.2.19 and I am following the documentation for adding existing nodes to
a cluster<http://www.datastax.com/docs/1.1/cluster_management#adding-capacity-to-an-existing-cluster>.

We are choosing to double our cluster from six to twelve. I ran the token generator. Based
on what I read in the documentation, I expected to see the same first six tokens and six new
tokens. Instead I see almost the same tokens but off by a few numbers. Is this expected? Should
I change the similar tokens to the new ones? Am I doing it wrong?


Here is the output I am dealing with.

With six:

DC #1:
  Node #1:                                        0
  Node #2:   28356863910078205288614550619314017621
  Node #3:   56713727820156410577229101238628035242
  Node #4:   85070591730234615865843651857942052863
  Node #5:  113427455640312821154458202477256070484
  Node #6:  141784319550391026443072753096570088105

With twelve:

DC #1:
  Node #01:                                        0
  Node #02:   14178431955039102644307275309657008810
  Node #03:   28356863910078205288614550619314017620
  Node #04:   42535295865117307932921825928971026430
  Node #05:   56713727820156410577229101238628035240
  Node #06:   70892159775195513221536376548285044050
  Node #07:   85070591730234615865843651857942052860
  Node #08:   99249023685273718510150927167599061670
  Node #09:  113427455640312821154458202477256070480
  Node #10:  127605887595351923798765477786913079290
  Node #11:  141784319550391026443072753096570088100
  Node #12:  155962751505430129087380028406227096910
Mime
View raw message