Durable writes

Another keyspace option, which is often not required to tamper with, is durable_writes. By default, durable writes is set to true.

When a write request is received, the node first writes a copy of the data to an on-disk append-only structure called commitlog. Then, it writes the data to an in-memory structure called memtable. When the memtable is full or reaches a certain size, it is flushed to an on-disk immutable structure called SSTable. Setting durable writes to true ensures data is written to the commitlog. In case the node restarts, the memtables are gone since they reside in memory. However, memtables can be reconstructed by replaying the commitlog, as the disk structure won't get wiped out even with node restarts.

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.