R + W > N

We'll cover the following...

Say we always read from r nodes and write to w nodes in a n node system then as long as the following inequality holds the writes to the system will be durable and the read from the system will return the latest value:

R + W > N

For our three node system, where N=3 we can choose R=1 and W=3. With these values we’ll write to all the nodes in the system and if any of the nodes is down then the write request will fail. Reading from any of the nodes in the system will naturally return the latest value since the write was recorded at all the nodes.

widget

As a corollary of the above inequality we can further say:

  • If R < N then we can still process reads if a single node is down, e.g. N=3, R=1 and W=3. In fact, with this configuration we can tolerate upto two ...

Access this course and 1400+ top-rated courses and projects.