On 8 April 2014 09:29, vck <veesee...@gmail.com> wrote:

>  After reading through the vnodes and partitioning described in the
> datastax documentation, I am still confused about how rows are
> partitioned/replicated.
>
> With vnodes, I know that each Node on the ring now supports many token
> ranges per Node. However I am still not very clear on how the replication
> is carried out.
>
> If I have 4 Nodes A, B, C, D and their ranges are below.
>
> A - [1,2,3,4]
> B - [5,6,7,8]
> C - [9,10,11,12]
> D - [13,14,15,16]
>
> After a shuffle, lets assume the Nodes are shuffled like this.
>
> A - [1,5,13,9]
> B - [2,6,14,10]
> C - [3,7,15,11]
> D - [4,8,16,12]
>
> now if I use a simple replication strategy and RF=3, the first replica
> rowkey gets placed on node determined by the partitioner.
>
> Prior to vnode, if my rowkey hash is 2, it gets placed on Nodes A, B, C.
> With the above vnode setup, if my rowkey hash is 2, does it get placed in
> B, C, D ?
>
Yes. The only difference vnodes makes to the calculation of where replicas
live is that replicas are not placed on the same node.

Richard.

Reply via email to