Key structures in Cassandra
Node is the basic infrastructure component of Cassandra. Where we can store data in a cluster. Cassandra is a Masterless architecture so all nodes in a cluster having same priority.
Datacenter is a collection of related nodes. A datacenter can be a physical datacenter or virtual datacenter. In Cassandra cluster all datacenters are active and allow the users to perform the operations.
A cluster contains one or more datacenters. It can span physical locations.
Commit log is responsible for store latest transactions info. All data first written in to the commit log for durability. It stores into in a disk for crash recoveries.
All data is written in to the memtables along with the Commit log it is a memory component in Cassandra.
A sorted string table (SSTable) is an immutable data file, to which Cassandra writes memtables periodically. SSTables are append only and stored on disk sequentially and maintained for each Cassandra table.
In Cassandra the deleted data is marked as a Tombstone. This data will not displayed to the user’s when they selecting. When compaction occur this data will be deleted automatically.
SSTables are immutable so it will not overwrite for new TX’s. A table may contains one are more SSTables at disk level, when compaction tack place all TX’s will written in to new SSTable then old SSTables will be Removed.
A collection of ordered columns fetched by table row. A table consists of columns and has a primary key.