收藏 分销(赏)

cassandra-via-docker-151202235733-lva1-app6892.pptx

上传人:二*** 文档编号:12784263 上传时间:2025-12-06 格式:PPTX 页数:66 大小:3.27MB 下载积分:5 金币
下载 相关 举报
cassandra-via-docker-151202235733-lva1-app6892.pptx_第1页
第1页 / 共66页
本文档共66页,全文阅读请下载到手机保存,查看更方便
资源描述
Body Level One,Body Level Two,Body Level Three,Body Level Four,Body Level Five,Title Text,Apache Cassandra,via Docker,Chris Ballance,Diligent Corporation,ballance,What well cover,Docker Fundamentals,CAP Theorem,Cassandra Fundamentals,Demo of Cassandra deployed with Docker,Docker,Hosting&Coordination,Docker Hub,“GIT for Virtual Machines”,Docker Images,Ubuntu,Centos,Debian,Fedora,Cassandra,mySQL,mongoDB,Node,Java,Erlang,Ruby,Rails,Wordpress,Redis,Hipache,NGINX,Create your own!,CAP THEOREM,Project Delivery Triangle,Good,Fast,Cheap,Good,Fast,Cheap,Project Delivery Triangle,Consistent,Available,Partition Tolerant,CAP Theorem,CAP Theorem,Consistent,Available,Partition Tolerant,Available,Partition Tolerant,Consistent,Consistent,Partition Tolerant,Available,Consistent,Available,Partition Tolerant,Consistent,Available,Partition Tolerant,Partition Tolerance is a myth!,We can guarantee Consistency,but not Availability.,We may time out or fail to return anything,Consistent,Available,Partition Tolerant,We can guarantee Availability,but our data may not be Consistent with other nodes,Consistent,Available,Partition Tolerant,Our business needs will drive whether,we choose Consistency or Availability,Partition Tolerant,Implementations,Consistent,Available,Partition Tolerant,AP,Cassandra,CouchDB,CP,MongoDB,Big Table(GFS),CA,RDBMS,SQL Server,A contrived example for,Consistency,A,B,User writes S1 to Node B,A,B,S0,S0,S1,User queries Node ANodes B&A have not syncd,A,B,S1,S0,S1,Query is blocked,until B syncs with A,A,B,S0,S1,S1,?,Once B syncs with A,the query on A is unblocked,and returns S1 as expected,A,B,S1,S1,S1,S1,S1,:-),*The query could potentially time out,A contrived example for,Availability,A,B,User writes S1 to Node B,A,B,S1,S0,S0,User queries Node A for S1,A,B,S1,S1,S0,Query returns current state of A,but is not consistent with B,A,B,S1,S1,S0,S0,S1,?,A later query of A yields S1 previously written to B.Eventual consistency has been achieved.,Idempotence,Event Sourcing,Local Caching,Queueing,A,B,S1,S1,S1,S1,S1,:-),Cassandra,History,Developed for Facebook Inbox Search,Created by one of the authors of Amazon Dynamo,Released as Open Source in 2008,Became an Apache Incubator project in 2009,Graduated to an Apache Top Level Project,Who is using Cassandra in production today?,Twitter,Netflix,Credit Suisse,Cisco,Many more,PlanetCassandra.org/companies/,Benefits,Linear Scalability,Data Sets can be larger than available memory,Multi-master,Built-in support for handling multiple data centers,Decentralized&Distributed-No single point of failure,Integrated caching,Consistency options can be tuned through configuration,Supports MapReduce,Familiar query syntax-CQL(Cassandra Query Language),Designed for sparse loading of loosely typed data,Linear Scalability,Challenges,JOINs are not supported!(not unique to Cassandra),Not for financial data(eventual consistency),Tooling is not yet as mature as Oracle or SQL Server,Why NOSQL?,Multiple persistence strategies,Use the right tool for the job.Sometimes more than one tool is appropriate.NoSQL can work in conjunction with SQL solutions.For example,you might have trasactions you continue to store in a Relational Database,and build your new user social graph data in a NoSQL solution.Cant decide on a local database for a mobile app?Sometimes the best route is to just persist the whole thing as JSON on disk until you need something faster.,Total Cost of Ownership(TCO),Lets face it,SQL Server is expensive.If you need it,and can fully justify the cost,then it might be right for you.But as weve discussed,RDBMS can be a crutch and a default choice for persistence layers.Defaults are just that,default.Theyre a catch-all that is rarely the best choice unless youre resolving generic default problems,Write(consistency two),Write(consistency two),Client,Write(consistency two),Client,Write(consistency two),Client,Coordinator,Write(consistency two),Client,Coordinator,Replicant,Write(consistency two),Client,Coordinator,Replicant,Replicant,Write(consistency two),Client,Coordinator,Replicant,Replicant,Confirm,Write(consistency two),Client,Coordinator,Replicant,Replicant,Time-out,Confirm,Write(consistency two),Client,Coordinator,Replicant,Replicant,Time-out,Confirm,Replicant,Write(consistency two),Client,Coordinator,Replicant,Replicant,Time-out,Confirm,Confirm,Replicant,Write(consistency two),Client,Coordinator,Replicant,Replicant,Success,Time-out,Confirm,Confirm,Replicant,Read(consistency two),Client,Read(consistency two),Client,Read(consistency two),Client,Coordinator,Read(consistency two),Client,Coordinator,Read(consistency two),Client,Coordinator,Chosen Node,Chosen Node,Read(consistency two),Client,Coordinator,Chosen Node,Chosen Node,Read(consistency two),Client,Coordinator,Inconsistent,Node,Chosen Node,Read(consistency two),Client,Coordinator,Chosen Node,Inconsistent,Node,Read(consistency two),Client,Coordinator,Chosen Node,Chosen Node,Inconsistent,Node,Read(consistency two),Client,Coordinator,Chosen Node,Chosen Node,Inconsistent,Node,Read(consistency two),Client,Coordinator,Chosen Node,Chosen Node,Inconsistent,Node,Success,On-premise+Cloud,Consistency Modes,ALL,-Every node must have the data,QUORUM,-Most nodes must have the data,ONE,-At least one node must have the data,TWO,-At least two nodes must have the data,THREE,-At least three Nodes must have the data,ANY,-Any node has the data,EACH_QUORUM,-Each datacenter must have a quorum,LOAL_QUORUM,-Each node in the datacenter handling the request must have a quorum*Quorum=(replication_factor/2)+1,Calculating Consistency,R+W N,R Read level consistency,W Write level consistency,N Number of replicas of the data,Data Replication,SimpleStrategy,-Single data center,NetworkTopologyStrategy,-Recommended strategy for multiple data centers.Provides Cassandra with info about the location of nodes by rack and datacenter,Deploying Cassandra with Docker,Demo,Additional Resources,Apache Cassandra,cassandra.apache.org/,Docker,Hub,for Developers-Paul OFallon,Guid to NoSQL:Apache Cassandra(Free eBook),is.gd/CassandraFreeEbook,Cassandra 3.0-DataStax PDF,
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 环境建筑 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服