N = num of replicas
W = write quorum
R = read quorum
W or R = 1. 读写快, 但是consistency差
W or R > 1. 读写慢, consistency好.
R = 1, W = N. fast read, slow write.
W = 1, R = N, fast write, slow read
W + R > N. strong consistency. 因为至少有一个overlapping node with latest data.
W + R ≤ N. strong consistency is not guaranteed.
Strong consistency: any read operation returns a value corresponding to the result of the most updated write data item. A client never sees out-of-date data.
Weak consistency: subsequent read operations may not see the most updated value.
Eventual consistency: this is a specific form of weak consistency. Given enough time, all updates are propagated, and all replicas are consistent.
kv store使用quorum consensus. 那么我们可以修改n, r, w的配置来得到不同的表现