lundi 2 mars 2015

NoSQL: quorum vs sharding


After reading about few NoSQL techniques it looks for me that Quorum fails comparing with Virtual Sharding. Virtual sharding allow scalability and does not increase amount of read/writes across a system. What's also bad that I absolutely can't find any benefit of quorum over sharding.


Question: May you act as an advocate of quorum technique from perspective of data consistency/performance/scalability and bring a light to situations where it's better than sharding?


Below is my vision of the stuff. Correct me if I'm wrong please.


Quorum:


Suppose I have a booking system which demand high data consistency. As one of approaches with NoSQL to achieve data consistency is quorum, means R + W > N, where R - read nodes, W - write nodes and N - total amount of nodes.


As I understand, if you use quorum than to write a row your db need to perform a write operation W times. Also to read something your db need to do R reads. Right?


Virtual sharding:


As I understand, sharding - it's when there's something similar to hashmap, which by some criteria tells you where income data should be stored / from where should be read. Suppose you have N nodes. Virtual means that in order to avoid scalability problems, that hash map would be bigger than N, but suppose 10*N. That allow easily reconfigure it on adding new nodes.


What is extremely good about it that it doesn't demand any replication like quorum! Of course in sake of availability/failover you can bring one master-slave backup for each node. But that won't increase amount of read/writes in a system.





Aucun commentaire:

Enregistrer un commentaire