The write path

When Cassandra initially came out, it was widely considered a write-optimized database. Whenever a client makes a write request, a coordinator node receives it. The coordinator node forwards the request to the relevant nodes based on the partition key and replication factor. The reason local writes are fast in Cassandra is because all the writes are appended to an append-only commitlog and to an in-memory structure called memtable. This doesn't require any disk seeks unlike local reads. We will take a more in-depth look at the write path in this section as well as the different operations involved to get rid of unnecessary data and keep data consistent across nodes.

The write path consists of four steps:

  1. Append data to the ...

Get Learning Apache Cassandra - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.