Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Cassandra architecture

13,136 views

Published on

Compare PostgreSQL at scale with Cassandra. Show

Published in: Technology

Cassandra architecture

  1. 1. Comparing Cassandra to PostgreSQL deployed   think different at scale Jake Luciani datastax.com @tjake
  2. 2. PostgreSQL - Example at Scale
  3. 3. Cassandra at Scale
  4. 4. Cassandra - BigTable and Dynamo <ul><ul><li>Peer to peer (master-less) </li></ul></ul><ul><ul><li>Tunable Consistency </li></ul></ul><ul><ul><li>Nested Tree data model </li></ul></ul><ul><ul><li>Pluggable replication/sorting </li></ul></ul><ul><ul><li>Low latency  </li></ul></ul><ul><ul><li>Tight integration with Hadoop Stack (+Hive) </li></ul></ul><ul><ul><li>Major adoption and development </li></ul></ul><ul><ul><li>0.8 Offers CQL (SQL like query interface) </li></ul></ul><ul><li>   </li></ul>
  5. 5. Cassandra's Data Model
  6. 6. Cassandra - Partitioning
  7. 7. Cassandra - Scale Up / Scale Down
  8. 8. Cassandra - Replication
  9. 9. Tunable Consistency - per read/write <ul><ul><li>ONE - Return once one replica responds success </li></ul></ul><ul><ul><li>QUORUM - Return once RF/2 + 1 replicas respond </li></ul></ul><ul><ul><li>ALL - Return when all replicas respond </li></ul></ul><ul><li>Want async replication? </li></ul><ul><li>     Write = ONE, Read = ONE (Performance++) </li></ul><ul><li>Want Strong consistency?  </li></ul><ul><li>     Read = QUORUM, Write = QUORUM  </li></ul><ul><li>Want Strong Consistency per DataCenter? </li></ul><ul><li>     Read = LOCAL_QUORUM, write LOCAL_QUORUM </li></ul>
  10. 10. NoSQL -> MoSQL <ul><li>SQL : create table foo(key int not null,  bar varchar(80) ) </li></ul><ul><li>CQL: create columnfamily foo </li></ul><ul><li>SQL: insert into table foo values (1,&quot;hello&quot;) </li></ul><ul><li>CQL: none </li></ul><ul><li>SQL: update foo set bar = &quot;world&quot; where key = 1 </li></ul><ul><li>CQL: update foo set bar = &quot;world&quot; where key = 1 </li></ul><ul><li>SQL: create index baridx on foo(bar); </li></ul><ul><li>CQL: create index on foo('bar'); </li></ul><ul><li>SQL: select * from foo where bar = 'world' </li></ul><ul><li>CQL: select * from foo where bar = 'world' </li></ul>

×