18

Why Cassandra

Ÿ   MySQL drives too many random I/Os

Ÿ   File-based solutions require far too many locks

Ÿ   Cassandra vs MySQL with 50GB of data

MySQL Cassandra
~300ms write ~0.12ms write
~350ms read ~15ms read

分布式领域CAP(Consistency, Availability, Partition tolerance)理论

Consistency(一致性), 数据一致更新,所有数据变动都是同步的

Availability(可用性), 好的响应性能

Partition tolerance(分区容错性) 可靠性

定理:任何分布式系统只可同时满足二点,没法三者兼顾。(这个定理并没有被证明)

忠告:架构师不要将精力浪费在如何设计能满足三者的完美分布式系统,而是应该进行取舍。

Cassandra特点

  1. High availability高可用性
  2. Incremental scalability可扩展
  3. Eventually consistent最终一致性
  4. Tunable tradeoffs between consistency and latency
  5. 灵活的schema,不需要象数据库一样预先设计schema,增加或者删除字段非常方便(on the fly)。
  6. 支持range查询:可以对Key进行范围查询。
  7. Minimal administration
  8. 单点故障不影响集群服务No SPF (Single Point of Failure) 更多详细内容 »
Tags:

作者:Jock

Switch to our mobile site