Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

2/11/2022

Reading time:1 min

Key structures in Cassandra

by John Doe


 
 Post Views: 
 5,386
Dear Readers,In this article we will see Key structures in Cassandra.NodeNode 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.DatacenterDatacenter 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 logCommit 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.MemtablesAll data is written in to the memtables along with the Commit log it is a memory component in Cassandra.SSTableA 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.TombstoneIn 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.CompactionSSTables 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. 
Note: Please test scripts in Non Prod before trying in Production.

Illustration Image

Post Views: 5,386

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

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

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

Note: Please test scripts in Non Prod before trying in Production.

Related Articles

cassandra
architecture
cassandra.architecture

Cassandra Architecture | Data Replication Strategy & Factor

John Doe

5/18/2022

cassandra
cassandra.architecture

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

cassandra