In which I discourse on Java bloat and Cassandra Node Balancing.

So, I was hoping to write a little snippet of code to embed on my blog to allow people to get the token ranges for load balancing their cluster.

In Cassandra, when using the random partitioner, all keys are given a token (essentially an md5 of the Key) that is between 0 and 2^127 (0 through 170141183460469231731687303715884105728 for non-nerds). That range is known as the ring.

Each member node of the Cassandra cluster owns a range of those keys on the ring in the same vein you’d divide up a pie.

Continue reading

Share