You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Kant Kodali <ka...@peernova.com> on 2016/11/28 16:28:19 UTC

What is the size of each Virtual Node token range?

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

Re: What is the size of each Virtual Node token range?

Posted by Kant Kodali <ka...@peernova.com>.
Sorry by row I mean partition key. you do answer part of my question!
thanks!

On Mon, Nov 28, 2016 at 8:39 AM, Benjamin Roth <be...@jaumo.com>
wrote:

> 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 <ka...@peernova.com>:
>
>>
>> 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
> Prokurist
>
> Jaumo GmbH · www.jaumo.com
> 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
>

Re: What is the size of each Virtual Node token range?

Posted by Benjamin Roth <be...@jaumo.com>.
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 <ka...@peernova.com>:

>
> 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
Prokurist

Jaumo GmbH · www.jaumo.com
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