Is Cassandra configured to lose 10 seconds of default data?

Since the data in Commitlog is periodically uploaded to disk every 10 seconds (commitlog_sync_period_in_ms are controlled), so if all replicas are broken within 10 seconds, will I lose all this data? Does this mean that theoretically a Cassandra cluster could lose data?

+4
source share
2 answers

If a node crashed just before updating the commit log on disk, then yes, you can lose up to ten seconds of data.

If you save multiple replicas using a replication ratio above 1 or have several data centers, then most of the lost data will be on other nodes and will be restored to the crashed node when it is restored.

A commit log can also be recorded in less than ten seconds if the recording level is high enough to reach size limits of up to ten seconds.

If you want more durability than this (due to higher latency), you can change the commitlog_sync parameter from periodic to batch. In batch mode, it uses the commitlog_sync_batch_window_in_ms parameter to control how often batches of records are written to disk. In batch mode, recordings are not recorded before recording to disk.

, , , acks, . , , , - .

SSD, , .

+7

http://wiki.apache.org/cassandra/Durability

" Cassandra commitlog_sync , commitlog commitlog_sync_period_in_ms , , ".

+3

All Articles