3 min to complete
Each node in a ring is assigned a range. The hash function computes a token for a given partition key. The hash function determines the placement of the data in the cluster.
Without using Vnodes or virtual nodes, each node could only support one token range. By using vnodes, each node can support multiple, non-contiguous token ranges. By doing this, we can think of each physical node as hosting many virtual nodes. By default, each node has 256 virtual nodes.
You can read more about Vnodes in ScyllaDB Docs.
To see the tokens for each node on our cluster, we use the nodetool ring command:
docker exec -it scylla-node1 nodetool ring
This shows us the token range for each node. The value in the column Token is the end of the token range, up to (and including) the value listed.
Another way to show the tokens present on a specific node is with the describing command using the keyspace as a parameter:
docker exec -it scylla-node1 nodetool describering scyllau