Get the App
SLTechnology News&Howtos  ›  Database  › 

Basic introduction to Cassandra (3)-introduction to Architecture

Shulou Source: shulou.com Published: 2022-06-01 13:11:35 10月04日 Update

Through the above two sections, you learned about the problems encountered by RDBMS, as well as a basic understanding of Cassandra. Here's a look at the simple internal structure of Cassandra.

Through this chapter, you should know:

Cassandra Write process

What is SSTable?

Cassandra Read process

Cassandra Write process

Writes can be written to any node in the cluster

Writes is written to commit log as well as to memtable

Each write contains a timestamp

Memtable periodically flush to the hard disk (sstable)

When the content of memtable exceeds the limit of its configuration, the data it contains is placed in a queue and flushed to disk. You can change the length of the queue by changing the value of memtable_flush_queue_size in cassandra.yaml

A new memtable is created in memory

Deletion is a special write called "tombstone" (tombstone)

What is SSTable?

The SSTable ordered string list (Sorted String Table) is a concept borrowed from Google's Bigtable. Once memtable is brushed to disk and becomes a SSTable, it is immutable.

The features are as follows:

Data files: storing records, immutable

Each write contains a timestamp

Partition is split into multiple SSTable

A new memtable is created in memory

With compaction merge, only the latest timestamp is saved

Delete is marked as tombstone

Cassandra Read process

Any server can be queried as coordinator

Locate the interactive nodes by querying key

On each node, the data is pulled from the SSTable and merged

Consistency

< ALL时,将会在后台执行read repaire(read_repaire_chance)

Tags: Process data memory disk queue medium variable query ordered special consistent consistent content can be passed at the same time background tombstone multiple characters strings Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Docker Redmi NVidia Huawei