AKAIK,
For read the coordinator sends the request to the number of nodes specified in the RF. RR is kicked off on the coordinator node after the read has completed. There is no key coordinator, what would you do if it as down ? The first node in the list of replication nodes is considered special, but not that special. (In a normal read only the first node is asked for the data, others nodes are asked for a digest)
write same as read. One hop from the coordinator node to the nodes that will do the write. The one hop part is discussed in the paper.
N is the number of copies of the data that will be stored. W is the consistency level the client is happy to accept to say that the write has succeed, after W have ack'd to the coordinator it will ack to the client. But it's more complicated that that, search the archives for a big discussion on Handed Hint Off
If you client always operates such that R+W>N you have consistency. If you drop the R down to 1 you may read data that is not consitent with the other nodes in the ring, because the coordinator returns to as soon as the first node does. It will then look at the result from the other nodes and kick off the Read Repair is needed. But this is after your read request has completed.
Aaron
On 03 Sep, 2010,at 03:19 PM, Ying Tang <ivytang0...@gmail.com> wrote:
Recently , i read the paper about Cassandra again .And now i have some concepts about the reading and writing .We all know Cassandra uses NWR ,When read :the request ---> a random node in Cassandra .This node acts as a proxy ,and it routes the request.Here ,1. the proxy node route this request to this key's coordinator , the coordinator then routes request to other N-1 nodes OR the proxy routes the read request to N nodes ?2. If it is the former situation , the read repair occurs on the key's coordinator ?If it is the latter , the read repair occurs on the proxy node ?When write :the request ---> a random node in Cassandra .This node acts as a proxy ,and it routes the request.Here ,3. the proxy node route this request to this key's coordinator , the coordinator then routes request to other N-1 nodes OR the proxy routes the request to N nodes ?4. The N isn't the data's copy numbers , it's just a range . In this N range , there must be W copies .So W is the copy numbers.So in this N range , R+W>N can guarantee the data's validity. Right?
--Best regards,Ivy Tang