Why is clock synchronization (NTP) important in a Cassandra cluster, and what can go wrong if clocks drift?
Last updated
Cassandra resolves conflicts by last write wins: the cell with the highest timestamp wins, and nodes stamp writes from their own clocks.
Clock drift causes silently lost updates, resurrected deleted data (misordered tombstones), and wrong TTL expiry.
Run
NTPor chrony on every node to keep clocks within milliseconds.USING TIMESTAMPonly shifts the burden to clients.
- https://cassandra.apache.org/doc/stable/cassandra/architecture/dynamo.html
- https://docs.datastax.com/en/hyper-converged-database/2.0/drivers/timestamps.html
- http://jakubdziworski.github.io/java/cassandra/database/2022/11/22/cassandra-updates-ordering.html
- https://docs.datastax.com/en/dse/6.9/drivers/timestamps.html
- https://axonops.com/blog/linux-time-management-for-cassandra/
- https://axonops.com/blog/
- https://axonops.com/docs/data-platforms/cassandra/architecture/time-synchronization/ntp-fundamentals/
- https://axonops.com/docs/data-platforms/cassandra/architecture/time-synchronization/security/