本文有標題黨之嫌。在NoSQL如日中天的今天,各種NoSQL產品可謂百花齊放,但每一個產品都有自己的特點,有長處也有不適合的場景。本文對Cassandra, Mongodb, CouchDB, Redis, Riak 以及 HBase 進行了多方面的特點分析,希望看完此文的您能夠對這些NoSQL產品的特性有所了解。
CouchDB |
Best used: For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important. For example: CRM, CMS systems. Master-master replication is an especially interesting feature, allowing easy multi-site deployments. |
Redis |
Best used: For rapidly changing data with a foreseeable database size (should fit mostly in memory). For example: Stock prices. Analytics. Real-time data collection. Real-time communication. |
MongoDB |
Best used: If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks. For example: For all things that you would do with MySQL or PostgreSQL, but having predefined columns really holds you back. |
Cassandra |
Best used: When you write more than you read (logging). If every component of the system must be in Java. (“No one gets fired for choosing Apache’s stuff.”) For example: Banking, financial industry (though not necessarily for financial transactions, but these industries are much bigger than that.) Writes are faster than reads, so one natural niche is real time data analysis. |
Riak |
Best used: If you want something Cassandra-like (Dynamo-like), but no way you’re gonna deal with the bloat and complexity. If you need very good single-site scalability, availability and fault-tolerance, but you’re ready to pay for multi-site replication. For example: Point-of-sales data collection. Factory control systems. Places where even seconds of downtime hurt. |
HBase |
Best used: If you’re in love with BigTable. For example: Facebook Messaging Database (more general example coming soon) |
原文鏈接:Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison