Having N replicas more than nodes in the cluster

Grant Schofield grant at basho.com
Tue May 11 11:20:47 EDT 2010


On May 11, 2010, at 10:07 AM, Germain Maurice wrote:

> I'd like to know how works Riak when my bucket has n_val = 3 and only 2 physical nodes.
> Does Riak make 3 copies of the bucket over the 2 nodes or it maintains only 2 copies of my bucket on the cluster ?
> 
The data partitioning is done on they key level not the bucket level. An n_val of three will result in 3 vnodes/partitions holding replicas of the data. One 
of your nodes would control two of the three partitions.


> I'm doing tests of riak and i find some things weird.
> 
> I have a two nodes cluster and a bucket with n_val = 3.
> I put more than 1 600 000 documents in the bucket and it takes less than 200 GB with Innostore.
> I shut down the second node with "q()." in a "riak console".
> Firstly, there was no synchronisation of data on the first node, i assume it's better because very similar to a node crash.
> Secondly, when i did a read request on a document with :
> - ?r=1 -> success
> - ?r=2 -> success
> - ?r=3 -> fail

This is due to the fact that 2 of the 3 vnodes were able to respond with your data, but not the third because your took down the node that had 1 of the 3 partitions.

> 
> An other question, "n replicas" means "1 + n copies" or "n copies" of the bucket ?
> 

N replicas means N instances of the key will exist throughout the cluster.

Grant Schofield
Developer Advocate
Basho Technologies


> I really appreciate if you can explain me this behavior ?
> 
> Thank you
> Best Regards,
> -- 
> Germain Maurice
> Administrateur Système/Réseau
> Tel : +33.(0)1.42.43.54.33
> 
> http://www.linkfluence.net
> 
> 
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com





More information about the riak-users mailing list