"when a request comes in which node handles the request first"

You (ie. cassandra client) always specifies the exact node to send requests to. 
While most higher level clients let's you specify configurations for a whole 
cluster, that's usually for their own basic load balancing. Each request any of 
them sends through Cassandra's core thrift client, is sent explicitly to a 
single cassandra node.

"how does it determine which node has the key/value"

Every node is assigned a token which determines which keys it stores. Every 
node has access to that information, so any node can take a key for any request 
and figure out which node(s) should take the request.

"how cassandra ensures that read/write always O(1) complexity"

Cassandra has tuneable consistency that trades off with performance. For the 
lowest consistency level, writes return as soon as an append is made into the 
commit log file, an append is O(1) obv. For higher consistency levels, writes 
return after writing to the in memory table, that's not O(1) but it's in memory 
and is extremely fast. The on disk representation is updated asynchronously.

Reads are not O(1). Cassandra's basic algorithm for read and write is detailed 
here: http://wiki.apache.org/cassandra/ArchitectureOverview
________________________________________
From: mcasandra [[email protected]]
Sent: Thursday, February 10, 2011 5:36 PM
To: [email protected]
Subject: Basic Cassandra Architecture questions

I am reading interesting white paper about Dynamo. I might have to read it
again :) but I have a simple question, when a request comes in which node
handles the request first and how does it determine which node has the
key/value? Also, how cassandra ensures that read/write always O(1)
complexity? Can someone please explain that in detail?

http://www.allthingsdistributed.com/2007/10/amazons_dynamo.html
--
View this message in context: 
http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/Basic-Cassandra-Architecture-questions-tp6014218p6014218.html
Sent from the [email protected] mailing list archive at 
Nabble.com.

Reply via email to