Question

In section 4.5 Combining Sharding and Replication of the NoSQL Distilled book, the following assertion is made:

"Using peer-to-peer replication and sharding is a common strategy for column-family databases."

The statement leaves out other types of cluster-ready databases, namely key-value and document stores. Why is this the case? Are those databases well suited for sharding, but not in conjunction with peer-to-peer replication? Is master-slave replication a better approach in those cases?

Was it helpful?

Solution

Peer-to-peer replication has more to do with the consistency model. You're making a tradeoff between fault tolerance and consistency, where a peer-to-peer model chooses the former and a master-slave model the latter. It is possible to achieve consistency through means such as using quorum reads and writes, so you can often achieve both in practice--even though the database isn't technically consistent.

There are certainly examples of non-CF stores that use peer-to-peer replication, such as CouchBase, a document store, and Riak, a KV store. These databases perform very well and use auto-sharding in some form.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top