cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Roth <>
Subject Re: What is the size of each Virtual Node token range?
Date Mon, 28 Nov 2016 16:39:46 GMT
A token does not identify a row. A token is a hash value of the partition
key and the hash can have 2^64 different values. A collision is a normal
thing in a hash table and it just means that different rows with the same
token simply go to the same (v-)node, just like if they were different but
in the same token range.
You could even compare this to the typical implementation of a hash table
in C, Java, Perl, whatever. A hashtable is a kind of a sparse array with
the hash key as index and a linked list (or more complex implementations)
as value where a list of all entries with the same hash values are stored.
This simply makes it fast to find an entry by key without looping through
all the list entries and comparing them with a key you are looking for.

This thesis is maybe more correct:
There can be no more than 2^64 nodes in a cluster as then 2 nodes would
share exactly the same token and this does not make really sense.

2016-11-28 17:28 GMT+01:00 Kant Kodali <>:

> 1) What is the size of each Virtual Node token range?
> 2) Are all Vnode token ranges in one server are of the same size?
> 3) If these token ranges are predefined then isn't it implying that the
> maximum total number of rows in a server is also predefined?
> maximum total number of rows in a server = num_tokens_in _vnode_1 +
> num_tokens_in _vnode_2 + num_tokens_in _vnode_3 + ............+
> num_tokens_in _vnode_256

Benjamin Roth

Jaumo GmbH ·
Wehrstraße 46 · 73035 Göppingen · Germany
Phone +49 7161 304880-6 · Fax +49 7161 304880-1
AG Ulm · HRB 731058 · Managing Director: Jens Kammerer

View raw message