Member-only story
Cassandra Database Study Guide — Reads and Writes
Reading and Writing in Cassandra
Cassandra is a peer-to-peer, read/write anywhere architecture, so any user can connect to any node in any data center and read/write the data they need, with all writes being partitioned and replicated for them automatically throughout the cluster.
To access data in Cassandra, it is key to understand how C* stores data. The hinted handoff feature plus Cassandra’s ACID without the C (Atomic, Isolated and Durable) database are key concepts to understand reads and writes. In C* consistency refers to how up to date and synchronized a row of data is on all of its replicas.
Writes in Cassandra
Here are some key words to know to understand the write path
Partitioning Key — each table has a Partitioning Key. It helps with determining which node in the cluster the data should be stored.
Commit Log — the transactional log. It’s used for transactional recovery in case of system failures. It’s an append only file and provides durability.
Memtable — a memory cache to store the in memory copy of the data. Each node has a memtable for each CQL table. The memtable accumulates writes and provides read for data which are not yet stored to disk.