architect-handbook

Software Architect Handbook

View on GitHub

Quorum Consensus

Overview

Quorum consensus can guarantee consistency for both read and write operations. Some definitions first:

A coordinator acts as a proxy between the client and the nodes.

$W = 1$ does not mean data is written on one server. For instance, with the configuration in previous example, data is replicated at s0, s1, and s2. $W = 1$ means that the coordinator must receive at least one acknowledgement before the write operation is considered successful.

The configuration of W, R, and N, is a typical tradeoff between latency and consistency. If $W = 1$ or $R = 1$, an operation is returned quickly because a coordinator only needs to wait for a response from any of the replicas. If $W > 1$ or $R > 1$, the system offers better consistency; however, the query will be slower because the coordinator must wait for the response from the slowest replica.

Design scope

How to configure N, W, and R to fit our use case? Here are some of the possible setups: