Advanced
Open
Pro
Cassandra Token Ranges
Cassandra uses consistent hashing with virtual nodes. A cluster has 3 nodes and a replication factor of 2 (each row stored on 2 consecutive nodes clockwise). A write arrives for a key that hashes to position 500 on the ring, and the token ranges are:
- Node A: tokens 0–333
- Node B: tokens 334–666
- Node C: tokens 667–999 (wraps to Node A)
- Which node is the primary (coordinator) for this write?
- Which node stores the replica?
- With RF=2, what is the minimum number of nodes that can fail before data is lost?