tags:

views:

220

answers:

3

I'm trying to understand what the "rings" in Riak are, but I can't seem to find a clear explanation (please don't just link me to a web site, I have already read what is on the web). As far as I understand a node in Riak is a partition in a ring. Is that correct?

+5  A: 

I know you've said you read everything on the web already, but for others also reading this question, I'd like to post two resources that discuss Riak's "ring":

http://riak.basho.com/arch.html

http://riak.basho.com/edoc/architecture.txt

With that out of the way, Riak uses the word "ring" in two places. The first is to describe the hash space that is used for determining where to store data. The reason Riak calls that space a ring is that the last value in the space (2^160-1) is thought of as being adjacent to the first value in the space (0). Replicas of data are stored in the "next N partitions" of the hash space, following the partition to which the key hashes. Considering the hash space as a ring gives a convenient definition for the "next parition after the final partition."

The other use of the word "ring" is related to, but not exactly the same as the former. I mentioned partitions: each node claims several segments of the hash space, called partitions. Knowledge about which node has claimed which partition is stored in a structure that Riak calls the "ring state", or sometimes just the "ring." Other cluster metadata may also be kept in the ring state, because it's a conveniently shared piece of data throughout the cluster.

In general usage, an application shouldn't need to think about the ring much.

Does that answer your question? I'd encourage you to post questions like this to the riak-users mailing list ( http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com ). I'm sure other members of that list are interested in these answers, and we (the Riak developers) tend to be more attentive to that feed than this one.

Bryan
Does this mean that a ring contains a max of potentialliy 2^160 nodes?
Zubair
I'll post to both stackoverflow and the Riak mailing list. The only problem with the mailing list is that its not very easy to use.
Zubair
Also I have tried logging into the Riak mailing list but it doesn't seem to work.
Zubair
Yes, this does mean there's a max potential number of nodes (cluster members storing data) of 2^160. Just to be clear: that's 2 to the power of 160 ~= 1.46 quindecillion members.
Bryan
:) Yes, sorry, I didn't mean to sound as if it wasn't enough nodes :) Ok, I guess I understand them better now
Zubair
A: 

Can you explain what is not working about the mailing list? What url are you using?

John Hornbeck
I went to:http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.comI subscribed. Then I tried logging in where it says:Riak-users subscribers but it doesn't allow me in. I have also emailed some questions to be added, and it does say they will be seen by the moderator first, so I do know that the system must have recognised me
Zubair
A: 

It seems that you are not confirmed on the list. After you subscribe you will have to confirm your subscription. Once you have done that you can send emails to [email protected] and they will go through.

hornbeck
How do I confirm my subscription? I haven't received any confirmation mail?
Zubair
right after you signup it should email you. Check your spam folder as it may have been put there.
hornbeck
I subscribed again and this time I received the email. When I log in I still don't see any way to reply to messages though.
Zubair
You reply to messages through email, not the web ui.
hornbeck
@hornbeck: People are downvoting you because you're posting multiple "answers" when you really should just be adding a comment to Bryan's answer, above. Please consider deleting these (non)answers and posting comments, instead.