SlideShare a Scribd company logo
1 of 39
Cassandra 简介 [email_address] 童家旺 http://www.dbthink.com
A highly scalable, eventually consistent, distributed, structured key-value store.
议题介绍 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cassandra 的设计背景 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Cassandra 的设计目标 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scalability ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Scalability[2] ,[object Object],[object Object],[object Object],[object Object],[object Object]
基本的存储模型 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
基本的存储模型 [2]
CAP Theorem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CAP Theorem[2] ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CAP Theorem[3] http://blog.nahurst.com/visual-guide-to-nosql-systems
Cassandra 使用案例
Cassandra 使用案例 [2] user site application others evaluated Jonathan Ellis-3 Rackspace  stats collection (testing, almost production),Mail & Apps division (early testing) HBase, Hypertable, dynomite,and Voldemort Ryan King Twitter storage for all tweets a custom mysql impl, voldemort, hbase, mongodb, memcachdb, hypertable, and others Edmond Lau Ooyala store and serve our near real-time video analytics data HBase, Cassandra, Voldemort, and some others Joe Stump SimpleGeo real-time location infrastructure scott w Onespot a subset of our data store Tokyo, Voldemort and Riak and Cassandra Vitaly Kushner Astrails a project for one of our clients(early development stage)   Dan Di Spaltro Cloudkick  store monitoring statistics and running analytics over the data   Eric Lubow ShermansTravel mailing system,social network usage Cassandra and Tokyo Cabinet/Tokyo Tyrant Richard grossman bee.tv smart TV and movies recommendations , index each day all the TV shows in every states + all the new VOD sources    matthew hawthorne Comcast tons of data that we are migrating into non-relational storage cassandra, riak, voldemort, and hdfs Santal Li Cisco Webex store User Feed & User Activity data Voldemort, MemcacheDB, Dynomite
Cassandra 设计 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
它山之石
它山之石 [2] ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Consistency Models ,[object Object],[object Object],[object Object]
客户端一致性 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
服务端一致性 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Cassandra 支持的一致性 ,[object Object],[object Object],Write Read Level Description Level Description ZERO Cross fingers ANY 1 st   Response (Including HH) One 1 st   Response One 1 st   Response QUORUM N/2 + 1 Replicas QUORUM N/2 + 1 Replicas ALL All Replicas ALL  All Replicas
Read Repair ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hinted handoff ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Consistent Hashing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Consistent Hashing[2]
Data Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data Model KEY ColumnFamily1  Name  : MailList   Type  : Simple   Sort  : Name   Name : tid1 Value : <Binary> TimeStamp : t1 Name : tid2 Value : <Binary> TimeStamp : t2 Name : tid3 Value : <Binary> TimeStamp : t3 Name : tid4 Value : <Binary> TimeStamp : t4 ColumnFamily2  Name  : WordList   Type  : Super   Sort  : Time   Name : aloha ColumnFamily3  Name  : System   Type  : Super   Sort  : Name   Name : hint1 <Column List> Name : hint2 <Column List> Name : hint3 <Column List> Name : hint4 <Column List> Name : dude C2  V2 T2 C6 V6 T6 Column Families are declared upfront Columns are added and modified dynamically SuperColumns are added and modified dynamically Columns are added and modified dynamically C1  V1 T1 C2 V2 T2 C3 V3 T3 C4 V4 T4
Storage Model Key (CF1 , CF2 , CF3) Commit Log Binary serialized  Key ( CF1 , CF2 , CF3 ) Memtable ( CF1) Memtable ( CF2) Memtable ( CF2) FLUSH ,[object Object],[object Object],[object Object],Dedicated Disk <Key name><Size of key Data><Index of columns/supercolumns>< Serialized column family>  --- --- --- --- <Key name><Size of key Data><Index of columns/supercolumns>< Serialized column family> BLOCK Index  <Key Name> Offset, <Key Name> Offset K 128   Offset K 256   Offset K 384   Offset Bloom Filter (Index in memory) Data file on disk
Storage Model-Compactions K1 < Serialized data > K2 < Serialized data > K3 < Serialized data > -- -- -- Sorted K2 < Serialized data > K10 < Serialized data > K30 < Serialized data > -- -- -- Sorted K4 < Serialized data > K5 < Serialized data > K10 < Serialized data > -- -- -- Sorted MERGE  SORT K1 < Serialized data > K2 < Serialized data > K3 < Serialized data > K4 < Serialized data > K5 < Serialized data > K10 < Serialized data > K30 < Serialized data > Sorted K1  Offset K5  Offset K30  Offset Bloom Filter Loaded in memory Index File Data File D E L E T E D
Storage Model- 写操作 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Storage Model- 写相关特性 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Storage Model- 读操作 / 特性 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Anti-Entropy Gossip  通讯 ,[object Object],[object Object],[object Object],[object Object]
Gossip- 初时状态
Gossip- 第一回合
Gossip- 第 3 回合
Gossip- 第 3 回合
Gossip- 第 4 回合
故障检测 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

张铁安:Feed系统架构浅析
张铁安:Feed系统架构浅析张铁安:Feed系统架构浅析
张铁安:Feed系统架构浅析Leechael
 
Mysql企业备份发展及实践
Mysql企业备份发展及实践Mysql企业备份发展及实践
Mysql企业备份发展及实践maclean liu
 
NoSQL-MongoDB介紹
NoSQL-MongoDB介紹NoSQL-MongoDB介紹
NoSQL-MongoDB介紹國昭 張
 
分区表基础知识培训
分区表基础知识培训分区表基础知识培训
分区表基础知识培训maclean liu
 
淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践Wensong Zhang
 
“云存储系统”赏析系列分享三:Sql与nosql
“云存储系统”赏析系列分享三:Sql与nosql“云存储系统”赏析系列分享三:Sql与nosql
“云存储系统”赏析系列分享三:Sql与nosqlknuthocean
 
Ocean base 千亿级海量数据库-日照
Ocean base 千亿级海量数据库-日照Ocean base 千亿级海量数据库-日照
Ocean base 千亿级海量数据库-日照Shaoning Pan
 
大数据时代feed架构 (ArchSummit Beijing 2014)
大数据时代feed架构 (ArchSummit Beijing 2014)大数据时代feed架构 (ArchSummit Beijing 2014)
大数据时代feed架构 (ArchSummit Beijing 2014)Tim Y
 
TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例maclean liu
 
深入学习Mongo db
深入学习Mongo db深入学习Mongo db
深入学习Mongo dbLucien Li
 
TSM6培训教程
TSM6培训教程TSM6培训教程
TSM6培训教程acqua young
 
Ocean base海量结构化数据存储系统 hadoop in china
Ocean base海量结构化数据存储系统 hadoop in chinaOcean base海量结构化数据存储系统 hadoop in china
Ocean base海量结构化数据存储系统 hadoop in chinaknuthocean
 
20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页
20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页
20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页liu sheng
 
Couchbase introduction - Chinese
Couchbase introduction - Chinese Couchbase introduction - Chinese
Couchbase introduction - Chinese Vickie Zeng
 
Taobao图片存储与cdn系统到服务
Taobao图片存储与cdn系统到服务Taobao图片存储与cdn系统到服务
Taobao图片存储与cdn系统到服务Wensong Zhang
 
Zh Tw Introduction To Hadoop And Hdfs
Zh Tw Introduction To Hadoop And HdfsZh Tw Introduction To Hadoop And Hdfs
Zh Tw Introduction To Hadoop And Hdfskevin liao
 
Google big table 中文版
Google big table 中文版Google big table 中文版
Google big table 中文版lovingprince58
 
浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华zhuozhe
 
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索liu sheng
 

What's hot (20)

张铁安:Feed系统架构浅析
张铁安:Feed系统架构浅析张铁安:Feed系统架构浅析
张铁安:Feed系统架构浅析
 
Mysql企业备份发展及实践
Mysql企业备份发展及实践Mysql企业备份发展及实践
Mysql企业备份发展及实践
 
NoSQL-MongoDB介紹
NoSQL-MongoDB介紹NoSQL-MongoDB介紹
NoSQL-MongoDB介紹
 
分区表基础知识培训
分区表基础知识培训分区表基础知识培训
分区表基础知识培训
 
淘宝软件基础设施构建实践
淘宝软件基础设施构建实践淘宝软件基础设施构建实践
淘宝软件基础设施构建实践
 
“云存储系统”赏析系列分享三:Sql与nosql
“云存储系统”赏析系列分享三:Sql与nosql“云存储系统”赏析系列分享三:Sql与nosql
“云存储系统”赏析系列分享三:Sql与nosql
 
No sql数据库笔谈
No sql数据库笔谈No sql数据库笔谈
No sql数据库笔谈
 
Ocean base 千亿级海量数据库-日照
Ocean base 千亿级海量数据库-日照Ocean base 千亿级海量数据库-日照
Ocean base 千亿级海量数据库-日照
 
大数据时代feed架构 (ArchSummit Beijing 2014)
大数据时代feed架构 (ArchSummit Beijing 2014)大数据时代feed架构 (ArchSummit Beijing 2014)
大数据时代feed架构 (ArchSummit Beijing 2014)
 
TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例TomCat迁移步骤简述以及案例
TomCat迁移步骤简述以及案例
 
深入学习Mongo db
深入学习Mongo db深入学习Mongo db
深入学习Mongo db
 
TSM6培训教程
TSM6培训教程TSM6培训教程
TSM6培训教程
 
Ocean base海量结构化数据存储系统 hadoop in china
Ocean base海量结构化数据存储系统 hadoop in chinaOcean base海量结构化数据存储系统 hadoop in china
Ocean base海量结构化数据存储系统 hadoop in china
 
20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页
20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页
20130626联动优势数据访问层DAL架构和实践5(刘胜)数据分片和分页
 
Couchbase introduction - Chinese
Couchbase introduction - Chinese Couchbase introduction - Chinese
Couchbase introduction - Chinese
 
Taobao图片存储与cdn系统到服务
Taobao图片存储与cdn系统到服务Taobao图片存储与cdn系统到服务
Taobao图片存储与cdn系统到服务
 
Zh Tw Introduction To Hadoop And Hdfs
Zh Tw Introduction To Hadoop And HdfsZh Tw Introduction To Hadoop And Hdfs
Zh Tw Introduction To Hadoop And Hdfs
 
Google big table 中文版
Google big table 中文版Google big table 中文版
Google big table 中文版
 
浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华浅析分布式存储架构—设计自己的存储- 58同城徐振华
浅析分布式存储架构—设计自己的存储- 58同城徐振华
 
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索
20141128(刘胜)UTC2014分布式和云服务的思考与实践——支付清算行业分布式架构的探索
 

Similar to Cassandra简介.ppt

Hacking Nginx at Taobao
Hacking Nginx at TaobaoHacking Nginx at Taobao
Hacking Nginx at TaobaoJoshua Zhu
 
美团技术沙龙04 - Kv Tair best practise
美团技术沙龙04 - Kv Tair best practise 美团技术沙龙04 - Kv Tair best practise
美团技术沙龙04 - Kv Tair best practise 美团点评技术团队
 
Cassandra的初步使用及一些简单的操作
Cassandra的初步使用及一些简单的操作Cassandra的初步使用及一些简单的操作
Cassandra的初步使用及一些简单的操作zhubin885
 
Cassandra运维之道(office2003)
Cassandra运维之道(office2003)Cassandra运维之道(office2003)
Cassandra运维之道(office2003)haiyuan ning
 
开源+自主开发 - 淘宝软件基础设施构建实践
开源+自主开发  - 淘宝软件基础设施构建实践开源+自主开发  - 淘宝软件基础设施构建实践
开源+自主开发 - 淘宝软件基础设施构建实践Wensong Zhang
 
淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务drewz lin
 
IoTDB OptimizeAndCaseStudy
IoTDB OptimizeAndCaseStudyIoTDB OptimizeAndCaseStudy
IoTDB OptimizeAndCaseStudyJialinQiao
 
淘宝商品库MySQL优化实践
淘宝商品库MySQL优化实践淘宝商品库MySQL优化实践
淘宝商品库MySQL优化实践Feng Yu
 
淘宝Java中间件之路 it168
淘宝Java中间件之路 it168淘宝Java中间件之路 it168
淘宝Java中间件之路 it168vanadies10
 
Redis 介绍 -田琪
Redis 介绍 -田琪Redis 介绍 -田琪
Redis 介绍 -田琪Shaoning Pan
 
百度分布式数据实践与进展
百度分布式数据实践与进展百度分布式数据实践与进展
百度分布式数据实践与进展yp_fangdong
 
淘宝分布式数据处理实践
淘宝分布式数据处理实践淘宝分布式数据处理实践
淘宝分布式数据处理实践isnull
 
Postgre sql intro 0
Postgre sql intro 0Postgre sql intro 0
Postgre sql intro 0March Liu
 
Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储 Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储 zhen chen
 
Delta Lake Architecture: Delta Lake + Apache Spark Structured Streaming
Delta Lake Architecture: Delta Lake + Apache Spark Structured StreamingDelta Lake Architecture: Delta Lake + Apache Spark Structured Streaming
Delta Lake Architecture: Delta Lake + Apache Spark Structured StreamingXiao Li
 
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...acelyc1112009
 
Hbase架构简介、实践
Hbase架构简介、实践Hbase架构简介、实践
Hbase架构简介、实践Li Map
 

Similar to Cassandra简介.ppt (20)

Hacking Nginx at Taobao
Hacking Nginx at TaobaoHacking Nginx at Taobao
Hacking Nginx at Taobao
 
美团技术沙龙04 - Kv Tair best practise
美团技术沙龙04 - Kv Tair best practise 美团技术沙龙04 - Kv Tair best practise
美团技术沙龙04 - Kv Tair best practise
 
Cassandra的初步使用及一些简单的操作
Cassandra的初步使用及一些简单的操作Cassandra的初步使用及一些简单的操作
Cassandra的初步使用及一些简单的操作
 
Cassandra运维之道(office2003)
Cassandra运维之道(office2003)Cassandra运维之道(office2003)
Cassandra运维之道(office2003)
 
开源+自主开发 - 淘宝软件基础设施构建实践
开源+自主开发  - 淘宝软件基础设施构建实践开源+自主开发  - 淘宝软件基础设施构建实践
开源+自主开发 - 淘宝软件基础设施构建实践
 
淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务淘宝对象存储与Cdn系统到服务
淘宝对象存储与Cdn系统到服务
 
IoTDB OptimizeAndCaseStudy
IoTDB OptimizeAndCaseStudyIoTDB OptimizeAndCaseStudy
IoTDB OptimizeAndCaseStudy
 
淘宝商品库MySQL优化实践
淘宝商品库MySQL优化实践淘宝商品库MySQL优化实践
淘宝商品库MySQL优化实践
 
淘宝Java中间件之路 it168
淘宝Java中间件之路 it168淘宝Java中间件之路 it168
淘宝Java中间件之路 it168
 
Redis 介绍 -田琪
Redis 介绍 -田琪Redis 介绍 -田琪
Redis 介绍 -田琪
 
Cdc@ganji.com
Cdc@ganji.comCdc@ganji.com
Cdc@ganji.com
 
百度分布式数据实践与进展
百度分布式数据实践与进展百度分布式数据实践与进展
百度分布式数据实践与进展
 
淘宝分布式数据处理实践
淘宝分布式数据处理实践淘宝分布式数据处理实践
淘宝分布式数据处理实践
 
Postgre sql intro 0
Postgre sql intro 0Postgre sql intro 0
Postgre sql intro 0
 
Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储 Ria的强力后盾:rest+海量存储
Ria的强力后盾:rest+海量存储
 
Delta Lake Architecture: Delta Lake + Apache Spark Structured Streaming
Delta Lake Architecture: Delta Lake + Apache Spark Structured StreamingDelta Lake Architecture: Delta Lake + Apache Spark Structured Streaming
Delta Lake Architecture: Delta Lake + Apache Spark Structured Streaming
 
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
The Construction and Practice of Apache Pegasus in Offline and Online Scenari...
 
Jvm内存管理基础
Jvm内存管理基础Jvm内存管理基础
Jvm内存管理基础
 
Hic2011
Hic2011Hic2011
Hic2011
 
Hbase架构简介、实践
Hbase架构简介、实践Hbase架构简介、实践
Hbase架构简介、实践
 

More from james tong

数据库系统设计漫谈
数据库系统设计漫谈数据库系统设计漫谈
数据库系统设计漫谈james tong
 
Migrating from MySQL to PostgreSQL
Migrating from MySQL to PostgreSQLMigrating from MySQL to PostgreSQL
Migrating from MySQL to PostgreSQLjames tong
 
Oracle 性能优化
Oracle 性能优化Oracle 性能优化
Oracle 性能优化james tong
 
Cap 理论与实践
Cap 理论与实践Cap 理论与实践
Cap 理论与实践james tong
 
Scalable system operations presentation
Scalable system operations presentationScalable system operations presentation
Scalable system operations presentationjames tong
 
Benchmarks, performance, scalability, and capacity what s behind the numbers...
Benchmarks, performance, scalability, and capacity  what s behind the numbers...Benchmarks, performance, scalability, and capacity  what s behind the numbers...
Benchmarks, performance, scalability, and capacity what s behind the numbers...james tong
 
Stability patterns presentation
Stability patterns presentationStability patterns presentation
Stability patterns presentationjames tong
 
The right read optimization is actually write optimization
The right read optimization is actually write optimizationThe right read optimization is actually write optimization
The right read optimization is actually write optimizationjames tong
 
My sql ssd-mysqluc-2012
My sql ssd-mysqluc-2012My sql ssd-mysqluc-2012
My sql ssd-mysqluc-2012james tong
 
Evaluating ha alternatives my sql tutorial2
Evaluating ha alternatives my sql tutorial2Evaluating ha alternatives my sql tutorial2
Evaluating ha alternatives my sql tutorial2james tong
 
Troubleshooting mysql-tutorial
Troubleshooting mysql-tutorialTroubleshooting mysql-tutorial
Troubleshooting mysql-tutorialjames tong
 
Understanding performance through_measurement
Understanding performance through_measurementUnderstanding performance through_measurement
Understanding performance through_measurementjames tong
 
我对后端优化的一点想法 (2012)
我对后端优化的一点想法 (2012)我对后端优化的一点想法 (2012)
我对后端优化的一点想法 (2012)james tong
 
设计可扩展的Oracle应用
设计可扩展的Oracle应用设计可扩展的Oracle应用
设计可扩展的Oracle应用james tong
 
我对后端优化的一点想法.pptx
我对后端优化的一点想法.pptx我对后端优化的一点想法.pptx
我对后端优化的一点想法.pptxjames tong
 
Enqueue Lock介绍.ppt
Enqueue Lock介绍.pptEnqueue Lock介绍.ppt
Enqueue Lock介绍.pptjames tong
 
Oracle数据库体系结构简介.ppt
Oracle数据库体系结构简介.pptOracle数据库体系结构简介.ppt
Oracle数据库体系结构简介.pptjames tong
 

More from james tong (17)

数据库系统设计漫谈
数据库系统设计漫谈数据库系统设计漫谈
数据库系统设计漫谈
 
Migrating from MySQL to PostgreSQL
Migrating from MySQL to PostgreSQLMigrating from MySQL to PostgreSQL
Migrating from MySQL to PostgreSQL
 
Oracle 性能优化
Oracle 性能优化Oracle 性能优化
Oracle 性能优化
 
Cap 理论与实践
Cap 理论与实践Cap 理论与实践
Cap 理论与实践
 
Scalable system operations presentation
Scalable system operations presentationScalable system operations presentation
Scalable system operations presentation
 
Benchmarks, performance, scalability, and capacity what s behind the numbers...
Benchmarks, performance, scalability, and capacity  what s behind the numbers...Benchmarks, performance, scalability, and capacity  what s behind the numbers...
Benchmarks, performance, scalability, and capacity what s behind the numbers...
 
Stability patterns presentation
Stability patterns presentationStability patterns presentation
Stability patterns presentation
 
The right read optimization is actually write optimization
The right read optimization is actually write optimizationThe right read optimization is actually write optimization
The right read optimization is actually write optimization
 
My sql ssd-mysqluc-2012
My sql ssd-mysqluc-2012My sql ssd-mysqluc-2012
My sql ssd-mysqluc-2012
 
Evaluating ha alternatives my sql tutorial2
Evaluating ha alternatives my sql tutorial2Evaluating ha alternatives my sql tutorial2
Evaluating ha alternatives my sql tutorial2
 
Troubleshooting mysql-tutorial
Troubleshooting mysql-tutorialTroubleshooting mysql-tutorial
Troubleshooting mysql-tutorial
 
Understanding performance through_measurement
Understanding performance through_measurementUnderstanding performance through_measurement
Understanding performance through_measurement
 
我对后端优化的一点想法 (2012)
我对后端优化的一点想法 (2012)我对后端优化的一点想法 (2012)
我对后端优化的一点想法 (2012)
 
设计可扩展的Oracle应用
设计可扩展的Oracle应用设计可扩展的Oracle应用
设计可扩展的Oracle应用
 
我对后端优化的一点想法.pptx
我对后端优化的一点想法.pptx我对后端优化的一点想法.pptx
我对后端优化的一点想法.pptx
 
Enqueue Lock介绍.ppt
Enqueue Lock介绍.pptEnqueue Lock介绍.ppt
Enqueue Lock介绍.ppt
 
Oracle数据库体系结构简介.ppt
Oracle数据库体系结构简介.pptOracle数据库体系结构简介.ppt
Oracle数据库体系结构简介.ppt
 

Cassandra简介.ppt

  • 1. Cassandra 简介 [email_address] 童家旺 http://www.dbthink.com
  • 2. A highly scalable, eventually consistent, distributed, structured key-value store.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10.
  • 11.
  • 14. Cassandra 使用案例 [2] user site application others evaluated Jonathan Ellis-3 Rackspace stats collection (testing, almost production),Mail & Apps division (early testing) HBase, Hypertable, dynomite,and Voldemort Ryan King Twitter storage for all tweets a custom mysql impl, voldemort, hbase, mongodb, memcachdb, hypertable, and others Edmond Lau Ooyala store and serve our near real-time video analytics data HBase, Cassandra, Voldemort, and some others Joe Stump SimpleGeo real-time location infrastructure scott w Onespot a subset of our data store Tokyo, Voldemort and Riak and Cassandra Vitaly Kushner Astrails a project for one of our clients(early development stage)   Dan Di Spaltro Cloudkick store monitoring statistics and running analytics over the data   Eric Lubow ShermansTravel mailing system,social network usage Cassandra and Tokyo Cabinet/Tokyo Tyrant Richard grossman bee.tv smart TV and movies recommendations , index each day all the TV shows in every states + all the new VOD sources   matthew hawthorne Comcast tons of data that we are migrating into non-relational storage cassandra, riak, voldemort, and hdfs Santal Li Cisco Webex store User Feed & User Activity data Voldemort, MemcacheDB, Dynomite
  • 15.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 26.
  • 27. Data Model KEY ColumnFamily1 Name : MailList Type : Simple Sort : Name Name : tid1 Value : <Binary> TimeStamp : t1 Name : tid2 Value : <Binary> TimeStamp : t2 Name : tid3 Value : <Binary> TimeStamp : t3 Name : tid4 Value : <Binary> TimeStamp : t4 ColumnFamily2 Name : WordList Type : Super Sort : Time Name : aloha ColumnFamily3 Name : System Type : Super Sort : Name Name : hint1 <Column List> Name : hint2 <Column List> Name : hint3 <Column List> Name : hint4 <Column List> Name : dude C2 V2 T2 C6 V6 T6 Column Families are declared upfront Columns are added and modified dynamically SuperColumns are added and modified dynamically Columns are added and modified dynamically C1 V1 T1 C2 V2 T2 C3 V3 T3 C4 V4 T4
  • 28.
  • 29. Storage Model-Compactions K1 < Serialized data > K2 < Serialized data > K3 < Serialized data > -- -- -- Sorted K2 < Serialized data > K10 < Serialized data > K30 < Serialized data > -- -- -- Sorted K4 < Serialized data > K5 < Serialized data > K10 < Serialized data > -- -- -- Sorted MERGE SORT K1 < Serialized data > K2 < Serialized data > K3 < Serialized data > K4 < Serialized data > K5 < Serialized data > K10 < Serialized data > K30 < Serialized data > Sorted K1 Offset K5 Offset K30 Offset Bloom Filter Loaded in memory Index File Data File D E L E T E D
  • 30.
  • 31.
  • 32.
  • 33.
  • 36. Gossip- 第 3 回合
  • 37. Gossip- 第 3 回合
  • 38. Gossip- 第 4 回合
  • 39.

Editor's Notes

  1. http://highscalability.com/blog/2009/10/26/facebooks-memcached-multiget-hole-more-machines-more-capacit.html http://highscalability.com/strategy-facebook-tweaks-handle-6-time-many-memcached-requests http://www.facebook.com/note.php?note_id=39391378919
  2. 上面来自 Vogel 的定义应该更多说明的是好的 Scalability 是怎么样的 http://www.dbthink.com/?p=357 性能与可伸缩性 http://www.dbthink.com/?p=352 简述伸缩性 A review of Forecasting Oracle Performance by Craig Shallahamer By Baron Schwartz
  3. http://www.slideshare.net/guestdfd1ec/design-patterns-for-distributed-nonrelational-databases (slides 22/23/24)
  4. 对 CAP 公理的详细描述 . http://www.julianbrowne.com/article/viewer/brewers-cap-theorem Brewer 的最初描述 http://www.cs.berkeley.edu/%7Ebrewer/cs262b-2004/PODC-keynote.pdf 两位教授对 CAP 公理的证明 . http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.20.1495&amp;rep=rep1&amp;type=pdf Daniel Abadi 对 CAP Theorem 的质疑 ,C 并不是始终为 A 做牺牲 , 因为 P 是一个很少发生的事实 , 大部分情况下 ,C 可能更多的是为 L(Latency) 做牺牲 . http://dbmsmusings.blogspot.com/2010/04/problems-with-cap-and-yahoos-little.html
  5. About ACID http://en.wikipedia.org/wiki/ACID About BASE http://queue.acm.org/detail.cfm?id=1394128 Eventual Consistency http://www.allthingsdistributed.com/2008/12/eventually_consistent.html
  6. http://blog.nahurst.com/visual-guide-to-nosql-systems
  7. http://www.slideshare.net/egpeters/nosql-cassandra-talk-for-seattle-tech-startups-31010-3399002(slides 3)
  8. http://n2.nabble.com/Cassandra-users-survey-td4040068.html http://www.dbthink.com/?p=183
  9. http://www.slideshare.net/benjaminblack/introduction-to-cassandra-replication-and-consistency(slide 2)
  10. http://www.slideshare.net/benjaminblack/introduction-to-cassandra-replication-and-consistency(slide 3,4)
  11. http://en.wikipedia.org/wiki/Consistency_model
  12. 因果一致性 。如果进程 A 通知进程 B 它已更新了一个数据项,那么进程 B 的后续访问将返回更新后的值,且一次写入 将保证取代前一次写入。与进程 A 无因果关系的进程 C 的访问遵守一般的最终一致性规则。 “ 读己之所写( read-your-writes )”一致性 。当进程 A 自己更新一个数据项之后,它总是访问到 更新过的值,绝不会看到旧值。这是因果一致性模型的一个特例。 会话( Session )一致性 。这是上一个模型的实用版本,它把访问存储系统的进程放到会话的上下文中。只要 会话还存在,系统就保证“读己之所写”一致性。如果由于某些失败情形令会话终止,就要建立新的会话,而且系统的保证不会延续到新的会话。 单调( Monotonic )读一致性 。如果进程已经看到过数据对象的某个值,那么任何后续访问都不会返回在那 个值之前的值。 单调写一致性 。系统保证来自同一个进程的写操作顺序执行。要是系统不能保证这种程度的一致性,就非常难以编程 了。 具体可参考 http://www.allthingsdistributed.com/2008/12/eventually_consistent.html http://www.ningoo.net/html/2010/cap_theorem_and_eventually_consistent.html
  13. http://wiki.apache.org/cassandra/ReadRepair
  14. http://wiki.apache.org/cassandra/HintedHandoff
  15. http://tech.idv2.com/2008/07/24/memcached-004/
  16. http://www.slideshare.net/gdusbabek/cassandra-presentation-for-san-antonio-jug http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model http://wiki.apache.org/cassandra/DataModel
  17. http://www.slideshare.net/jhammerb/data-presentations-cassandra-sigmod(slide 5)
  18. http://www.slideshare.net/jhammerb/data-presentations-cassandra-sigmod(slide 7)
  19. http://www.slideshare.net/jhammerb/data-presentations-cassandra-sigmod(slide 8)
  20. http://spyced.blogspot.com/2009/05/consistent-hashing-vs-order-preserving.html http://ria101.wordpress.com/2010/02/22/cassandra-randompartitioner-vs-orderpreservingpartitioner/ http://www.slideshare.net/jhammerb/data-presentations-cassandra-sigmod (slide 6)
  21. http://www.slideshare.net/jhammerb/data-presentations-cassandra-sigmod ( slide 9) http://www.slideshare.net/jbellis/cassandra-open-source-bigtable-dynamo( slide 22) 或许是 Cassandra 在后期做了调整 , 在上面第一个 ppt 以及原始的 Paper 中 , 都是基于 Key 的原子性 , 但是 ,Jonathan Ellis(Cassandra 的项目负责人 ) 在后面一个 ppt 中改成了基于 ColumnFamily 的原子性 , 本 ppt 采纳后者 .
  22. http://www.slideshare.net/jbellis/cassandra-open-source-bigtable-dynamo (slide 23/24)
  23. http://www.slideshare.net/jhammerb/data-presentations-cassandra-sigmod ( slide 12)
  24. http://www.slideshare.net/guestdfd1ec/design-patterns-for-distributed-nonrelational-databases (slide 35-39), 本页以及后续 4 页 .
  25. http://www.slideshare.net/jhammerb/data-presentations-cassandra-sigmod (slide 13) http://www.dbthink.com/?p=372 ( 5.3.1 一节 ) 给定部分阈值 Φ, 并假定当 Φ=1 时我们就决定怀疑一个节点 A, 我们犯错误 ( 例如 , 这个决定在将来可能由于心跳接收延迟而被证明是错误的 ) 的概率为 10%.Φ=2 时出错的概率大约为 1%,Φ=3 大约为 0.1%, 等等 .