Cassandra - Distributed Data Store
-
Upload
peerapat-asoktummarungsri -
Category
Technology
-
view
878 -
download
2
Transcript of Cassandra - Distributed Data Store
CassandraNoSQL Distributed Key-Value Store
ME
TPSE 2013
TPSE 2015
Agile Thailand 2015
Big Data Conference 2015 @ Taipei
Untitled 2016
Fulltime Software Engineer
Why Big Data need new storage technology?
• 1 Brand• 4 Hotels• 10 Rooms
• 1 Brand• 775,000 Hotels
Cassandra
Linearly scalable
Fully Durable
Fully Distributed, no SPOF
Tuneable Consistency
Multi-master, Multi-DC
Linearly scalable
Fully durable
Fully Distributed, no SPOF
P1
I need P1
P1 P2P6
P1
P1
Tuneable Consistency
Replication Factor
Read Consistency Level (One, Two, Quorum, All)
Write Consistency Level (One, Two, Quorum, All)
Replication FactorINSERT P1
Replication FactorINSERT P1
= 3
Replication FactorINSERT P1
= 3
P1
P1 P1
Consistency LevelINSERT P1
P1
P1
= ALL
P1
100 ms
110 ms
200 ms
200 ms
DONE
Consistency LevelINSERT P1
P1
P1
= 1
P1
100 ms
110 ms
200 ms
??? ms
DONE
Consistency LevelSELECT P1
P1
P1
= ALL
P1
50 ms
70 ms
60 ms
??? ms
P1
QUORUM=
N / 2 + 1
N = Replication Factor
N = 2, QUORUM = 2N = 3, QUORUM = 2N = 4, QUORUM = 3N = 5, QUORUM = 3
N = Replication Factor
Read Fast or Write Fast
WRITE - ALL ——> Read - 1
WRITE - ONE ——> Read - ALL
WRITE - QUARUM ——> Read - QUARUM
TuningTuning
Tuning
Tuning
Tuning
Multi DC
http://www.slideshare.net/cjohannsen/apache-cassandra-at-the-geek2geek-berlin
Replication Strategies
SimpleStrategy : Single Datacenter
NetworkTopologyStrategy : Multi Datacenter
KeyspaceName
Replication Stategy
Replication Factor
Durable Write
Tables
Index
TablesName
Column
Primary Key
Comment
Data Model
Partitioning Key
Clustering Column
Primary Key
CQL
INDEX BY DESIGN
NoSQL = No! SQL
Cassandra have table ,columns and CQL does not mean
it’s SQL
Message TTL
Insert = Upsert
Key-Value
https://academy.datastax.com/
Referenceshttp://www.slideshare.net/jbellis
http://cassandra.apache.org/
http://www.datastax.com/dev/blog/deploying-cassandra-across-multiple-data-centers
http://www.slideshare.net/cjohannsen/apache-cassandra-at-the-geek2geek-berlin