开发者

Membase vs. Cassandra?

Which is the better NoSQL database for most applications?


Both Cassandra (0.7x) and Membase:

  • A Key Value Database
  • Are FAST
  • Horizontally scalable
  • May be coupled with Hadoop for Mapreduce processing
  • Support Increment and Decrement

Cassandra has selectable per query durability/consistency guarantees

Cassandra has BigTable column support

Membase has asynchronous (开发者_如何学Goimmediate return) writes


Beyond the consistency guarantees why would you choose one over the other?


Cassandra offers rows broken up into columns that can be indexed, efficiently updated independently (instead of having to re-write the whole row/object), and used as materialized views (unlike relational rows, cassandra column names can be determined dynamically at runtime).

Cassandra offers fully multi-master replication across multiple datacenters, configurable per-keyspace. (E.g., I want 3 copies of data set X in north america datacenter and 1 copy in europe. But data set Y I want just 2 copies in north america.)

It's incorrect to say that "Cassandra is geared more towards writes than reads." The difference is that both are very fast with Cassandra, unlike most systems that are only fast at reads.

FWIW, Cassandra used to offer asynchronous writes, but we took it out because when you get to the limit of your capacity your choices are (1) running the server into the ground or (2) dropping requests with no feedback to the client that this is what happened. This isn't worth the very small performance increase.


Membase has recently merged with CouchDB, and will be updating it's disk/persisting layer from sqllite to CouchDB, giving Membase the ability to do map/reduce and querying/indexing.

One thing no one has mentioned yet is that Membase clusters are miraculously easy to setup, whereas Cassandra takes more system admin work.

Cassandra is also more widely adopted so far, though there are some key use cases for Membase such as Zynga and its social games.


This is really a simplistic question. Why are you not also comparing riak, Couchdb, Hadoop, and others?

There is no such thing as the NoSQL db which is better for most applications. Tokyo Tyrant is great for some stuff. SQLITE is an excellent db which can be scaled if you know what you are doing.

The whole point of noSql is to deconstruct the monolithic RDBMS and provide stripped down db tools that focus on the aspects of db access which are bottlenecks for YOUR application. Every application is different, and therefore there is no such thing as a best choice.

There is, however, a best strategy. That is to identify the raw performance needs of your application, find where the bottlenecks will be, and choose db tools (maybe noSQL and maybe RDBMS) which support those bottlenecks and help you manage them.

The blogosphere is filled with stories of people who started with the same simplistic question and ended up making the wrong choices. If you want the right answer you need to start by asking the right question, and sometimes you need to wake up and smell the coffee and realize that your application is just hard to manage from a technical perspective. Others have discovered that scaling problems can be solved better by the business people but the precondition is that the technical folks have to be able to explain the system, its bottlenecks and natural constraints, and the opportunities to scale more easily in certain ways if only the business would move in a different direction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜