Key structures in Cassandra

Share via:

 

Dear Readers,

In this article we will see Key structures in Cassandra.

Node

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

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.

Cluster

A cluster contains one or more datacenters. It can span physical locations.

 

 

Commit log
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.

Memtables
All data is written in to the memtables along with the Commit log it is a memory component in Cassandra.

SSTable
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.

 

 

Tombstone
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.

Compaction
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.

CQL Table 
A collection of ordered columns fetched by table row. A table consists of columns and has a primary key.

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (22 votes, average: 5.00 out of 5)
Loading...

8 thoughts on “Key structures in Cassandra

Add Comment