Cassandra partitions

In Cassandra, the data is stored in the nodes in partitions. A partition is analogous to a row in a relational database. A partition's key is passed to the murmur3 algorithm to generate a token. The token is used to identify the location of the partition in the cluster. The token is an integer whose value is between 2-63 and 263-1.  Hashing distributes data across the cluster so that there is minimum shuffling of partitions when nodes are added or removed. Each node is responsible for partitions belonging to the hash range it has been assigned. 

To further ease the pain of redistribution, Cassandra has virtual nodes, or v-nodes, which bundle partitions together. With v-nodes, you do not have to calculate and assign tokens to each node, which helps to rebuild the node faster in case of failure. The following given figure shows rings with and without v-nodes:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset