educative.io

Example for how to decide Preference List and read and write in sloppy quaram

Hi,

“which first stores the data locally and then replicates it to N−1 clockwise successor nodes on the ring.”
“This replication is done asynchronously (in the background), and Dynamo provides an eventually consistent model”

This dictates replication asynchronously on the N-1 nodes from the coordinator node.

“This list contains more than N nodes to account for failure”

How there will more than N nodes when data is replicated on N nodes.

“With this approach, all read/write operations are performed on the first N healthy nodes from the preference list”

Does this mean every read and and write happens on all replicas before responding? Shouldn’t just on majority will work?

I am confused about this. I tried rereading it multiple times but that didn’t help. Can you share an example which shows a read and write situation and how using preference list helps here.

“Following traditional quorum approaches, any distributed system becomes unavailable during server failures or network partitions and would have reduced availability even under simple failure conditions”

Will Appreciate if you can add example foe this one too.


Course: https://www.educative.io/courses/grokking-adv-system-design-intvw
Lesson: https://www.educative.io/courses/grokking-adv-system-design-intvw/3wBE8p832V4

Hi Aggarwal Sahil

For the first question, you’re actually confusing the Replicated nodes i.e., N with total number of nodes in the ring i.e., more than N. So eventually more than N nodes refer to the replicated nodes (Server 1 in Sloppy quorum and handling of temporary failures section) and non-replicated nodes (Server 4) that account for failure.

For the second question, Number of replicas in the quorum (majority replicas), For example, 3 replicas out of total 5 replicas is the majority, 2 replicas out of total 3 replicas is the majority, and majority is basically called the Quorum.

You’re right, the read/write operations are performed on the majority replicas (basically the quorum) before responding success to the client. In a regular quorum, if the majority is not available, we can’t perform the operation and report success to the client. Unavailability of majority replicas makes the system unavailable to the clients. To increase the availability of the system, sloppy quorums are introduced, that is also about performing the client operation on the majority replicas. But in this case, if majority is not available, temporary replicas are made to have the majority and to successfully perform the client operation.

Hope this helps. If you still have any issue, please let us know.
Thank you!