最近有很多关于卡桑德拉的话题。

Twitter, Digg, Facebook等都在使用它。

什么时候有意义:

使用卡桑德拉, 不用卡桑德拉,还有 使用RDMS而不是Cassandra。


当前回答

让我们来读一些真实的案例:

http://planetcassandra.org/apache-cassandra-use-cases/

本文地址:http://planetcassandra.org/blog/post/agentis-energy-stores-over-15-billion-records-of-time-series-usage-data-in-apache-cassandra

他们详细阐述了不选择MySql的原因,因为数据库同步太慢。

(也是由于2- phase commit, FK, PK)


Cassandra基于Amazon Dynamo纸

特点:

稳定

高可用性

备份性能良好

读写比HBase好,(java中的BigTable克隆)。

wiki http://en.wikipedia.org/wiki/Apache_Cassandra

他们的结论是:

We looked at HBase, Dynamo, Mongo and Cassandra. 

Cassandra was simply the best storage solution for the majority of our data.

截至2018年,

如果你需要支援,我建议你用ScyllaDB代替经典的cassandra。

Postgres kv插件也比cassandra快。无论如何不会有多实例可伸缩性。

其他回答

让我们来读一些真实的案例:

http://planetcassandra.org/apache-cassandra-use-cases/

本文地址:http://planetcassandra.org/blog/post/agentis-energy-stores-over-15-billion-records-of-time-series-usage-data-in-apache-cassandra

他们详细阐述了不选择MySql的原因,因为数据库同步太慢。

(也是由于2- phase commit, FK, PK)


Cassandra基于Amazon Dynamo纸

特点:

稳定

高可用性

备份性能良好

读写比HBase好,(java中的BigTable克隆)。

wiki http://en.wikipedia.org/wiki/Apache_Cassandra

他们的结论是:

We looked at HBase, Dynamo, Mongo and Cassandra. 

Cassandra was simply the best storage solution for the majority of our data.

截至2018年,

如果你需要支援,我建议你用ScyllaDB代替经典的cassandra。

Postgres kv插件也比cassandra快。无论如何不会有多实例可伸缩性。

你应该问自己以下问题:

(Volume, Velocity) Will you be writing and reading TONS of information , so much information that no one computer could handle the writes. (Global) Will you need this writing and reading capability around the world so that the writes in one part of the world are accessible in another part of the world? (Reliability) Do you need this database to be up and running all the time and never go down regardless of which Cloud, which country, whether it's VM , Container, or Bare metal? (Scale-ability) Do you need this database to be able to continue to grow easily and scale linearly (Consistency) Do you need TUNABLE consistency where some writes can happen asynchronously where as others need to be certified? (Skill) Are you willing to do what it takes to learn this technology and the data modeling that goes with creating a globally distributed database that can be fast for everyone, everywhere?

如果在这些问题中,你认为“可能”或“不”,你应该用别的词。如果你对所有问题的答案都是“当然”,那么你应该用卡桑德拉。

当你可以在一个盒子上做所有事情时,使用RDBMS。它可能比大多数方法都简单,任何人都可以使用它。

Cassandra是一个特定问题的答案:当您有太多数据,以至于无法在一台服务器上存储时,您该怎么办?如何将所有数据存储在多个服务器上,同时不破坏银行账户,不让开发人员抓狂?Facebook每天都会收到4tb的压缩数据。这个数字很可能在一年内增长两倍以上。

如果您没有这么多数据,或者您有数百万美元来支付企业Oracle/DB2集群安装费用,以及安装和维护它所需的专家,那么您可以使用SQL数据库。

然而,Facebook不再使用cassandra,现在几乎只使用MySQL,在应用程序堆栈中移动分区,以获得更快的性能和更好的控制。

another situation that makes the choice easier is when you want to use aggregate function like sum, min, max, etcetera and complex queries (like in the financial system mentioned above) then a relational database is probably more convenient then a nosql database since both are not possible on a nosql databse unless you use really a lot of Inverted indexes. When you do use nosql you would have to do the aggregate functions in code or store them seperatly in its own columnfamily but this makes it all quite complex and reduces the performance that you gained by using nosql.

在评估分布式数据系统时,您必须考虑CAP定理——您可以选择以下两个:一致性、可用性和分区容差。

Cassandra是一个可用的、支持最终一致性的分区容忍系统。要了解更多信息,请参阅我写的这篇博客文章:NoSQL系统的可视化指南。