From what i understand in cassandra When a client writes data to single server, it writes to the commit log(append only log with out random seeks).It then puts data into MEMTable this resides in memory. Then acknowledges saying the write is successfull. When MEMTable is full it is flushed to disk as an SSTable(sequential write)
In a multi Node cluster with 2 nodes named (node1,node2). When a client writes data to node1 that is supposed to reside in node2(according to the tokens assigned to the nodes).
- Where does the correspondin commit log stay Node1 or Node2?
- Which MEMTable does the data go to node1 or Node2?
- Where does the corresponding SSTable stay Node1 or Node2?
- How does the query give the data present in other Node's in-memory(when trying to read from Node1) ?