Database Reference
In-Depth Information
Now let's consider how data will be distributed across our three-node cluster. Cassandra
tokens are signed 64-bit integers, so the minimum possible hash is -263 or
-9223372036854775808 and the maximum possible hash is 263-1 or
9223372036854775807. So, our nodes will be assigned to token ranges as follows:
Node
Lowest Token
Highest Token
Node 1 -9223372036854775808 -3074457345618258604
Node 2 -3074457345618258603 3074457345618258601
Node 3 3074457345618258602 9223372036854775807
It's common to visualize a topology as a ring, with each range in the token space corres-
ponding to a portion of the circumference of the ring, much like degrees in an arc. We can
apply that visualization to our three-node cluster like this:
Now let's consider the location of each of the three rows we looked at previously. As it
turns out, each row falls in a different range in the token space: alice lives on Node 1 ,
ivan lives on Node 2 , and bob lives on Node 3 . Using our ring diagram, we can visual-
ize how each row is assigned to a node:
Search WWH ::




Custom Search