Overview of the internals

The preceding figure showed that write is stored both in memory and on disk. Periodically, the data is flushed from memory to disk:

The main thing to remember is that Cassandra writes its sorted string data files (SSTable files) as immutable. That is, they are written once, and never modified. When an SSTable file reaches its maximum capacity, another is written. Therefore, if data for a specific key has been written several times, it may exist in multiple SSTable files, which will all have to be reconciled at read-time.

Additionally, deletes in Cassandra are written to disk in structures known as tombstones. A tombstone is essentially a timestamped placeholder for a delete. The tombstone gets replicated out to all ...

Get Seven NoSQL Databases in a Week 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.