Does Cassandra support sharding?

亡梦爱人 提交于 2020-01-22 13:20:00

问题


Does Apache Cassandra support sharding?

Apologize that this question must seem trivial, but I cannot seem to find the answer. I have read that Cassandra was partially modeled after GAE's Big Table which shards on a massive scale. But most of the documentation I'm currently finding on Cassandra seems to imply that Cassandra does not partition data horizontally across multiple machines, but rather supports many many duplicate machines. This would imply that Cassandra is a good fit high availability reads, but would eventually break down if the write volume became very very high.


回答1:


Cassandra does partition across nodes (because if you can't split it you can't scale it). All of the data for a Cassandra cluster is divided up onto "the ring" and each node on the ring is responsible for one or more key ranges. You have control over the Partitioner (e.g. Random, Ordered) and how many nodes on the ring a key/column should be replicated to based on your requirements.

This contains a pretty good overview. Basic architecture

Also, I highly recommend reading the Dynamo white paper. While Cassandra is different than Dynamo in many ways, conceptually they stem from the same roots. Check it out: Dynamo White Paper




回答2:


yes, cassandra supports sharding, but in its own way.

In Mongodb each secondary node contains full data of primary node but in Cassandra, each secondary node has responsibility of keeping only some key partitions of data.



来源:https://stackoverflow.com/questions/16428008/does-cassandra-support-sharding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!