Cassandra Basic Introduction (3)-Architecture Introduction

Source: Internet
Author: User
Tags cassandra

Through the above 2 sections, we have learned about the problems encountered by RDBMS and have a basic understanding of Cassandra. The following is an introduction to the Cassandra internal simple structure.

Through this chapter, you should understand:

    1. Cassandra Write Process

    2. What is sstable

    3. Cassandra Read Process

    • Cassandra Write Process

    1. Writes can be written to any node in the cluster

    2. Writes is written to the commit log and written to Memtable

    3. Each write consists of a timestamp

    4. Memtable regular flush to hard drive (sstable)

      When the content of memtable exceeds its configured limit, the data it contains is placed in a queue and flushed to disk. You can change the length of the queue by modifying the value of Memtable_flush_queue_size in Cassandra.yaml

    5. The new memtable is created in memory

    6. Delete is a special write called "Tombstone" (Tombstone)

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/82/7A/wKioL1dWfYWS986iAAB9v7Fk5YE723.png "style=" float: none; "title=" 1.png "alt=" Wkiol1dwfyws986iaab9v7fk5ye723.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/82/7B/wKiom1dWfH6RgmDsAACklsVSMaA321.png "style=" float: none; "title=" 2.png "alt=" Wkiom1dwfh6rgmdsaacklsvsmaa321.png "/>

    • What is sstable

Sstable ordered string tables (Sorted string table) are the concepts borrowed from Google's bigtable. Once the memtable is written to disk and becomes a sstable, it is immutable.

Features are as follows:

    1. Data files: Storing records, not mutable

    2. Each write consists of a timestamp

    3. Partition is split into multiple sstable

    4. The new memtable is created in memory

    5. Merge with compaction to save only the latest timestamp

    6. Delete is marked as Tombstone

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/82/7A/wKioL1dWft_xHBdVAAE8z8vtlA8483.png "title=" 1.png " alt= "Wkiol1dwft_xhbdvaae8z8vtla8483.png"/>

    • Cassandra Read Process

    1. Any server can be queried as coordinator

    2. Locate the interactive nodes by querying key

    3. On each node, the data is pulled from Sstable and merged

    4. Consistency < All, the read Repaire (read_repaire_chance) will be executed in the background

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/82/7B/wKiom1dWgKnSHRvTAAFspihkQPs096.png-wh_500x0-wm_3 -wmp_4-s_1660290563.png "style=" Float:none; "title=" 1.png "alt=" Wkiom1dwgknshrvtaafspihkqps096.png-wh_50 "/>

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/82/7A/wKioL1dWgbHDoTIGAACMp7OCMQg792.jpg-wh_500x0-wm_3 -wmp_4-s_2053602060.jpg "style=" Float:none; "title=" 2.jpg "alt=" Wkiol1dwgbhdotigaacmp7ocmqg792.jpg-wh_50 "/>


This article is from the Java Architect's Road blog, so be sure to keep this source http://eric100.blog.51cto.com/2535573/1786998

Cassandra Basic Introduction (3)-Architecture Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.