When a store reads from only some of its copies, how likely is an answer to be out of date, and by how much? Can we promise that it is probably not?
We find out by exploring how the libraries of the scholars' coast, each entry answered for by three of them, worked out the odds that a reader who asks only a few is handed the newest version.
We find out by following the probabilities directly: a data item stored on a few replicas, a write acknowledged by some of them, a read answered by some others, and the exact odds that the answer is current.
After Peter Bailis, Shivaram Venkataraman, Michael J. Franklin, Joseph M. Hellerstein and Ion Stoica, Probabilistically Bounded Staleness for Practical Partial Quorums, 2012

Each link is an idea one paper took from another. Point at one, or tap it, to read how.
a paper this book retells a paper retold in another book a paper outside the series
On the scholars' coast, libraries answer readers from their own copies of the compendium, and live with copies that differ while couriers are on the road.* Every library keeps the whole compendium, but each entry has three home libraries that answer for it: a revision goes to them, and a reader who wants the newest version asks them.In this system, replicas answer clients from whatever copy they hold, accepting that copies may differ while messages are still in transit. Rather than copying every item to every machine, each item is stored on three designated replicas.
Every entry has three home libraries (N = 3) that answer for it. As everywhere on the coast, each version carries a tally, the day and hour it was written, and of two versions the larger tally is the newer.Every copy of a given item lives at its three replicas (N = 3). Each version carries a timestamp, and whenever two versions are compared, the larger timestamp is the newer.
A scholar who finishes a new version sends three couriers at once, one to each home library. Each home library that receives it puts it in its copy and sends a courier back to say so. As soon as W home libraries have answered, the writer announces the version (commits the write). The couriers still on their way to the other home libraries do not turn back; they deliver the version when they arrive.When a writer finishes a new version, it immediately sends three messages, one to each replica. Each replica that receives the version stores it and sends an acknowledgment back. As soon as W replicas have answered, the writer commits the write. Importantly, the messages still on their way to the remaining replicas are not recalled; they keep going and deliver the version when they arrive.
A reader who wants to consult the entry likewise sends a request to all three home libraries, waits for the fastest R replies, and takes whichever copy among them has the largest tally.When a client wants to read the item, it likewise sends a request to all three replicas, waits for the fastest R replies to come back, and takes whichever copy among those R replies has the largest timestamp.
Two numbers therefore govern the coast's speed and safety: how many answers (W) the writer waits for before announcing the version, and how many replies (R) the reader waits for before reading.Two numbers therefore govern the system’s speed and safety: how many acknowledgments (W) the writer waits for before committing, and how many replies (R) the client waits for before returning an answer.

A writer who waited for all three home libraries (W = 3), or a reader who waited for all three replies (R = 3), would be held up by every slow courier and every closed library.If a writer waited for all three replicas (W = 3) or a client waited for all three replies (R = 3), every single slow message or crashed replica would bring work to a halt.
Waiting for fewer libraries is faster and survives a closed door. The danger is that if W and R are too small, the home libraries that answered the writer and the home libraries that answered the reader might not overlap at all.Waiting for fewer replicas is faster and survives a crashed replica. The danger is that if W and R are too small, the replicas that answered the writer and the replicas that answered the client might not overlap at all.
Gold home libraries hold the new version. Ringed home libraries are the ones the reader hears from first.Each lane is one process, with real time running left to right: the writer W, the three replicas, and the client C. Dashed arrows are still in transit. The writer commits once its acknowledgments are in; the client reads at that moment and takes the first replies.
North of the coast, on the island's two summits, the Chamber and the Tholos rely on majority overlap: of four or five members, any two majorities share a member.* The rule here is more general. With N = 3 home libraries, whenever R + W > 3 (for instance W = 2 and R = 2), the W libraries that hold the announced version and the R libraries that answer the reader share at least one library. The reader takes the largest tally among the replies, so the reader is sure to get the announced version or a newer one.Majority overlap is the oldest idea in the series: out of three or five members, any two majorities share at least one member.* Here the rule is even more general: with N = 3 replicas, as long as R + W > 3 (for instance, W = 2 and R = 2), the W replicas that hold the committed version and the R replicas that answer the client must share at least one replica. Because the client picks the largest timestamp among its R replies, it is guaranteed to get the committed version or an even newer one.
Let there be N replicas, a write quorum QW of size W and a read quorum QR of size R, both subsets of the same N replicas. Claim. If R + W > N, the two quorums share a replica.
Yet with three home libraries, many choose W = 1 and R = 1 on purpose: waiting for only the fastest answer and the fastest reply makes writing and reading as quick as the nearest, least busy library. On the coast, waiting for one and asking one (W = 1, R = 1) is called the quick way.Yet in practice, practitioners with three replicas very often configure W = 1 and R = 1 on purpose, because waiting for only the single fastest acknowledgment and the single fastest reply makes both writing and reading as fast as the nearest, least-busy replica. Waiting for one and asking one (W = 1, R = 1) is the quick way.
Suppose a reader asks at the exact instant a version is announced, before the couriers to the remaining N − W home libraries have arrived, and suppose the R libraries that answer the reader first are a uniform random subset of the N home libraries.Suppose a client reads at the exact instant a version is committed, before the messages to the remaining N − W replicas have arrived, and suppose the R replicas that answer the client first are a uniform random subset of the N replicas.
With N = 3 home libraries and the quick way (W = 1, R = 1), only one home library holds the new version at the moment of announcement, while two still hold the old one. A reader who takes one random reply therefore misses the new version 2 times out of 3 (66.7%).With N = 3 replicas and the quick way (W = 1, R = 1), only one replica holds the new version at the moment of commit, while two still hold the old one. A client that takes one random reply therefore misses the new version 2 times out of 3 (66.7%).
Earlier theory on probabilistic quorums pointed out that if N is large and W and R scale with N (say, a third of the libraries each), two random subsets of size N/3 almost never miss each other.Earlier theory on probabilistic quorums pointed out that if N is large and W and R scale with N (say, a third of the replicas each), two random subsets of size N/3 almost never miss each other.
The page works these out from the count of the ways the reader's home libraries can all lie among those the version has not reached.The page works these out from the count of the ways the client’s replicas can all lie among those the version has not reached.
Let N be the number of replicas, W the write quorum size and R the read quorum size, the W replicas written and the R replicas read each chosen uniformly at random; C(n, r) is the number of subsets of size r of a set of size n. Claim. The probability ps that the read quorum misses the write quorum is C(N − W, R) / C(N, R).
That works well when an entry has 100 home libraries, where W = R = 30 misses fewer than twice in a million reads. But real stores keep three copies of an item, not 100, and still find the quick way well behaved. Two kinds of leeway explain it: leeway in versions (k) and leeway in time (t).That combinatorial effect is great if an item has 100 replicas, where W = R = 30 misses fewer than twice in a million reads. Real systems, however, keep N = 3 copies of each item, not 100, and operators still find W = 1, R = 1 well behaved when N = 3. Two kinds of leeway explain it: leeway in versions (k), and leeway in time (t).
First, suppose an entry is revised often, and a reader does not need the very newest version, only one of the newest k (what the paper calls k-staleness).First, suppose an item is updated frequently and a client does not strictly need the single newest version, as long as the copy returned is within the newest k versions (what the paper calls k-staleness).
Each of the last k announced versions was written to W home libraries. A reader's R replies are older than all k of those versions only if the reader's group misses the write group of the newest version, and misses that of the second newest, and so on for all k. If each write group is missed independently with probability ps, the chance of missing all k is psk, which falls exponentially with k.Each of the last k committed versions was written to W replicas. A client’s R replies return something older than all k of those versions only if the client’s group misses the write group of the newest version, and misses the write group of the second-newest version, and so on for all k versions. If each write group is independent with miss probability ps, the chance of missing all k of them is simply psk, which drops exponentially with k!
Worked out from the rule: one chance of a miss for each version that will do, all multiplied together.Worked out from the rule: one chance of a miss for each version that will do, all multiplied together.
Let ps = C(N − W, R) / C(N, R) be the probability that a read quorum misses one write quorum, and let k be the number of versions a reader will accept. Claim. A read returns a value more than k versions old with probability psk = psk.Let ps = C(N − W, R) / C(N, R) be the probability that a read quorum misses one write quorum, and let k be the number of versions a client will accept. Claim. A read returns a value more than k versions old with probability psk = psk.
Tolerating a few versions of staleness also reduces the load on the libraries: because a smaller R and W suffice to hit high confidence over k versions, each home library has to handle fewer couriers per read and write.Tolerating a few versions of staleness also reduces the load on the replicas: because a smaller R and W suffice to hit high confidence over k versions, each replica has to handle fewer messages per read and write.
Even more important than leeway in versions, however, is what happens in the moments after a version is announced, while the remaining couriers finish their walk.Even more important than leeway in versions, however, is what happens in the moments after a version is committed, while the remaining messages finish their journey.
The writer sent couriers to all three home libraries at the start, though the version was announced as soon as the fastest W answered. Moments after the announcement, the couriers to the other N − W home libraries arrive too (expanding quorums).Remember that the writer sent messages to all three replicas at the start, even though it committed as soon as the fastest W answered. Moments after the commit, the messages to the other N − W replicas arrive too (expanding quorums).
The paper defines t-visibility as the probability that a reader whose request starts at time t after a version is announced receives that version (or a newer one).The paper defines t-visibility as the probability that a client that starts its read at time t after a version is committed receives that version (or a newer one).
At the moment of announcement (t = 0), at least W home libraries hold the version. A little later the number holding it has grown from W toward N. Once all three hold it, even a reader who asks only one library (R = 1) is certain to get it.At the exact instant of commit (t = 0), at least W replicas hold the version. A short time t later, the number of replicas c holding the version has grown from W toward N. Once all N = 3 replicas hold it, even a client that asks only R = 1 replica is 100% certain to get it!
If an even newer version is announced before the first version's couriers have finished arriving, a reader who receives the newer version is completely up to date.If an even newer version is committed before the first version’s messages have finished arriving, a client that receives the newer version is completely up to date.
If a reader happens to read a version that has already reached one home library but has not yet been announced by its writer, that copy is ahead of the last announced version, not stale.If a client happens to read a version that has already reached one replica but has not yet been committed by its writer, that copy is ahead of the last committed version, not stale.
Let qc(t) be the probability that exactly c replicas hold version v at time t after v commits, for c from W to N. Claim. The probability of a stale read at time t is pst = Σc=WN qc(t) · C(N − c, R) / C(N, R).
Combining both kinds of leeway gives ⟨k, t⟩-staleness: the chance that a read begun t after commit returns one of the newest k versions. To compute t-visibility accurately, however, we have to look closely at the four courier journeys involved in a write and a read.Combining both kinds of leeway gives ⟨k, t⟩-staleness: the chance that a read begun t after commit returns one of the newest k versions. To compute t-visibility accurately, however, we have to look closely at the four message journeys involved in a write and a read.

Every write-and-read pair involves four courier legs (which the paper calls the WARS model), and each leg takes a random transit time:Every write-and-read pair involves four message legs (which the paper calls the WARS model), and each leg takes a random transit time:
1. W. The version's way out from the writer to each home library.
2. A. The acknowledgment's way back from each home library to the writer.
3. R. The request's way out from the reader to each home library.
4. S. The copy's way back from each home library to the reader.1. W. The write’s way out from the writer to each replica.
2. A. The acknowledgment’s way back from each replica to the writer.
3. R. The request’s way out from the client to each replica.
4. S. The response’s way back from each replica to the client.
A home library hands a stale copy to a reader whose request starts at time t after the announcement exactly when the request reaches it before the writer's courier with the version does. The reader's answer is stale only if every one of the fastest R replies came from a home library where the request outran the version.A particular replica i hands a stale copy to a client that starts its read at time t after the commit exactly when the client’s request reaches replica i before the writer’s message does. And the client’s overall answer is stale if and only if every one of the fastest R replies it receives came from a replica where the request outran the write.
Because the announcement time wt is the W-th order statistic of W + A and the reader takes the R smallest round trips of R + S, there is no simple closed-form formula for the probability of a stale read at time t. Instead, the librarians compute the exact odds by Monte Carlo simulation: replaying the four legs tens of thousands of times using journey times drawn from the couriers' logbooks.Because the commit time wt is the W-th order statistic of W + A and the client takes the R smallest round trips of R + S, there is no simple closed-form formula for the probability of a stale read at time t. Instead, the exact odds are computed by Monte Carlo simulation: replaying the four legs tens of thousands of times using journey times drawn from measured latency logs.
Choose, then play.
WARS names the four delays: W, from the coordinator to a replica for a write; A, the acknowledgment back; R, a read request to a replica; S, the response back. Let the write be sent at time 0, reach replica i at wi and be acknowledged at wi + ai; it commits at wt, the Wth smallest acknowledgment time. Claim. If R + W > N, a read begun at any t ≥ 0 after commit is not stale.
The method of §5.1 for the general case: draw N samples from each of W, A, R and S; compute wt, the Wth smallest of the sums W[i] + A[i]; order the replicas by R[i] + S[i]; and count the read stale when each of the first R satisfies wt + R[i] + t ≤ W[i]. Repeating this many times gives the probability for each t.
To verify that this four-leg replay matches reality, the authors tested it against an instrumented Apache Cassandra cluster across 50,000 writes. The predicted t-visibility curve matched the measured staleness to within 0.28% on average.
Running the four-leg replay reveals first of all which leg governs staleness: the version's way out (W), and especially how uneven (high-variance) it is.Running the four-leg replay reveals first of all which leg governs staleness: the write’s way out (W), and especially how uneven (high-variance) it is.
By the time the writer announces the version (wt = W1 + A1), the couriers carrying it to the other two home libraries have already been walking for that long. If all three walk at nearly the same pace, the other two arrive while the answer is still on its way back to the writer, so at the moment of announcement (t = 0) a reader using the quick way (W = 1, R = 1) already gets the new version 9 times in 10. Only when the way out is much slower or much more uneven than the other legs can a late courier still be on the road when a reader's request arrives.By the time the writer commits the version (wt = W1 + A1), the write messages to the other two replicas have already been travelling for wt. If all three write messages travel at nearly the same pace, the other two arrive while the acknowledgment is still travelling back to the writer, so at the very instant of commit (t = 0), a client using the quick way (W = 1, R = 1) already gets the new version 9 times out of 10! Only when W is much slower or much more variable than the other legs can a late write message still be in flight when a client’s request arrives.
The authors then replayed production latency distributions from LinkedIn (LNKD-SSD and LNKD-DISK), Yammer (YMMR), and wide-area networks (WAN).
These are the paper's measures. The page does not work them out.
On the SSD coast (LNKD-SSD), immediate visibility at t = 0 is high (97.4%), because median writes are fast; yet because occasional straggler writes take much longer (a long tail), reaching 99.9% certainty takes longer than on more uniform paths.On the SSD network (LNKD-SSD), immediate visibility at t = 0 is high (97.4%), because median writes are fast; yet because occasional straggler writes take much longer (a long tail), reaching 99.9% certainty takes longer than on more uniform paths.
When writes are slow (LNKD-DISK, where disk writes dominate network time), increasing N from 2 to 10 with W = R = 1 lowers immediate visibility at t = 0 from 58% to 21%, because only one of ten libraries has finished writing at commit. Yet the time to reach 99.9% visibility increases by only about 20%.When writes are slow (LNKD-DISK, where disk writes dominate network time), increasing N from 2 to 10 with W = R = 1 lowers immediate visibility at t = 0 from 58% to 21%, because only one of ten replicas has finished writing at commit. Yet the time to reach 99.9% visibility increases by only about 20%.
Bumping the reader from R = 1 to R = 2 (while keeping W = 1) slashes the wait for 99.9% visibility by 85%, while keeping combined read-and-write latency vastly lower than strict quorums.Bumping the client from R = 1 to R = 2 (while keeping W = 1) slashes the wait for 99.9% visibility by 85%, while keeping combined read-and-write latency vastly lower than strict quorums.
A returning reader may not mind a copy slightly behind the newest version, as long as time never runs backwards: the reader is never handed a version older than one read on an earlier visit (monotonic reads).Sometimes a returning client does not mind if a copy is slightly behind the very newest version, as long as it never sees time run backwards, that is, it is never handed a version older than one it already read on an earlier visit (monotonic reads).
Suppose that between two visits by the same reader, an average of m = γgw / γcr new versions are announced on the coast. Any of the newest 1 + m versions (the one read last time, plus the m written since) is at least as new as what the reader saw before, so monotonic reads reduce directly to k-staleness with k = 1 + m.Suppose that between two visits by this client, an average of m = γgw / γcr new versions are committed. Then any of the newest 1 + m versions (the one the client saw last time, plus the m versions written since) is at least as new as what the client saw before! That reduces monotonic reads directly to k-staleness with k = 1 + m.
A home library replaces a version only when a larger tally arrives, so its copy never moves backwards. A reader who always sends their requests to the same home library (sticky replica) never steps backwards unless that library closes.Because a single replica only ever replaces a version when a larger timestamp arrives, its copy never moves backwards. A client that always directs its requests to the same replica (sticky replica) is guaranteed never to read an older version unless that replica goes down.
Let a client read a data item at rate γcr and let the item be written, by all clients, at rate γgw. Claim. The probability of violating monotonic reads is psMR = (C(N − W, R) / C(N, R))1 + γgw / γcr.
PBS lets a library state the exact odds that a copy is current. Here are four things it cannot say.PBS lets a system state the exact odds that a copy is current. Here are four things it cannot say.

With partial quorums (R + W ≤ N), the answer is always no. The library can promise nine times in ten you receive the newest version within ten milliseconds, but in the worst case, if couriers are stopped, a partial quorum can return an arbitrarily old copy.With partial quorums (R + W ≤ N), the answer is always no. The system can promise nine times in ten you receive the newest version within ten milliseconds, but in the worst case, if messages are lost or cut off, a partial quorum can return an arbitrarily old copy.
They assume that courier delays are drawn independently from the distributions recorded in the logbooks, with no stopped couriers or closed libraries. They also conservatively ignore background anti-entropy (the festival and word of mouth) and read repair, which make real-world staleness even rarer.They assume that message delays are drawn independently from the distributions recorded in the latency logs, with no lost messages or crashed replicas. They also conservatively ignore background anti-entropy and read repair, which make real-world staleness even rarer.
Not when the first R replies arrive. Only afterward, when the remaining N − R replies trickle in, can the reader spot a larger tally that arrived late, and even that can be a harmless false alarm if the late reply reflects a version written after the read began.Not when the first R replies arrive. Only afterward, when the remaining N − R replies trickle in, can the client spot a larger timestamp that arrived late, and even that can be a harmless false alarm if the late reply reflects a version written after the read began.
PBS measures how recent one entry is. A reader who needs guarantees across several entries, such as never reading a reply before the entry it answers, or never leaving an entry without a source, needs guarantees about whole visits, and a library alone can give those only in part.*PBS measures recency on a single item. Clients that need guarantees across several items, such as never seeing a reply before the message it answers, or never breaking a constraint that spans two items, need transactional guarantees, which a replica cut off from the rest can give only in part.*
With small quorums a read may be stale, and the chance falls fast with every version of leeway and with every moment since the write was acknowledged.
It is a probability and a way to tune it. The worst case stays unbounded.
Setting Libraries That Agree in the End
Peter Bailis, Shivaram Venkataraman, Michael J. Franklin, Joseph M. Hellerstein and Ion Stoica, Probabilistically Bounded Staleness for Practical Partial Quorums. Proceedings of the VLDB Endowment, Vol. 5, No. 8 (38th International Conference on Very Large Data Bases, Istanbul, August 2012), 776–787. — Partial quorums, PBS k-staleness, t-visibility and monotonic reads, the WARS model, and a Monte Carlo evaluation on production latency data.
The ideas, plainly.
Bailis and co-authors study data kept on several machines, where a write is acknowledged after W of N machines have it and a read returns after R machines have answered. If R + W exceeds N, a read always meets the latest write. Operators often choose smaller numbers, for speed, so that a read may miss it. The paper asks how often, and shows that a read within k versions of the latest has probability 1 minus p to the k, where p is the chance of a plain miss: the chance of being stale falls exponentially with the leeway allowed. Monotonic reads is the same idea with k set by how often a reader returns compared with how often the data is written.Bailis and co-authors study data kept on several machines, where a write is acknowledged after W of N machines have it and a read returns after R machines have answered. If R + W exceeds N, a read always meets the latest write. Operators often choose smaller numbers, for speed, so that a read may miss it. The paper asks how often, and shows that a read within k versions of the latest has probability 1 minus p to the k, where p is the chance of a plain miss: the chance of being stale falls exponentially with the leeway allowed. Monotonic reads is the same idea with k set by how often a client returns compared with how often the data is written.
Staleness in time is harder, because writes keep reaching more machines after they are acknowledged. The paper models the four message delays of a write and a read, W, A, R and S, shows that a read is stale when its request reaches a replica before the write does, and works out the odds by simulation using measured delays. The results are that the delay of the write message, and above all its variance, matters most, and that typically the chance of reading the latest write is high within a short time of its commit, at a latency far below that of a strict quorum.
What the paper offers is therefore a probability and a way to tune it, not a guarantee: the worst case stays unbounded, and the odds rest on assumptions about independence and about the delays staying as they were measured.
The paper has five authors: Peter Bailis, Shivaram Venkataraman, Michael J. Franklin, Joseph M. Hellerstein and Ion Stoica, and all are credited here. Nobody in this telling is named; the writer, the home libraries and the reader are told apart by what they do.The paper has five authors: Peter Bailis, Shivaram Venkataraman, Michael J. Franklin, Joseph M. Hellerstein and Ion Stoica, and all are credited here.
| an entry's home libraries: the same few libraries hold every copy of it | The replication factor N; one quorum system per data item. §2.1, §2.2. |
| a version with its tally, the day and hour by the sun | A version with a timestamp giving a total order. §2.1. |
| the writer sends the version to all the home libraries | The coordinator sends the write to all N replicas. §2.2. |
| announced when enough home libraries have answered | The write quorum W: the write commits after W acknowledgments. §2.2. |
| a reader asks all home libraries and takes the first few replies | The read quorum R: the read returns after R responses. §2.2. |
| the version still on its way to the other home libraries after it is announced | Expanding quorums: the write quorum grows by anti-entropy after the write returns. §2.2. |
| groups sharing a home library when the numbers add to more than the home libraries | A strict quorum system: R + W > N. §2.1. |
| the quick way: wait for one, ask one | A partial quorum, R + W ≤ N, as deployed by operators. §1.1, §2.3. |
| the chance the groups miss each other; excellent for a crowd of home libraries | Probabilistic quorums: ps = C(N − W, R) / C(N, R). §2.1. |
| one of the newest few versions; the chance falls by the same fraction each | PBS k-staleness: psk = psk. §3.1. |
| a busy home library asked less often | Lower quorum load under staleness tolerance. §3.3. |
| the odds a while after the announcement | PBS t-visibility; the window of inconsistency. §3.4. |
| one of the newest few, a while after | PBS ⟨k, t⟩-staleness. §3.5. |
| the four legs: the version out, the acknowledgment back, the request out, the copy back | The WARS model: the delay distributions W, A, R, S. §4.1. |
| stale when the request outruns the version | A read is stale when the first R responses reached their replicas before the write. §4.1. |
| the couriers' logbook; replaying it by lot | Latency distributions; Monte Carlo simulation, validated against Cassandra. §5.1, §5.2. |
| the four coasts | LNKD-SSD, LNKD-DISK, YMMR and WAN latency fits. §5.4, §5.5. |
| a reader who never goes backwards | PBS monotonic reads: k = 1 + γgw / γcr. §3.2. |
| keeping to one home library | A sticky replica. §3.2. |
| learning afterwards from the late replies | Asynchronous staleness detection, with false positives. §4.3. |
| no festival and no word of mouth counted | The conservative assumption: read repair and Merkle-tree exchange never occur. §4.2. |
| a promise with odds: nine in ten, and nearly always one of the newest few | PBS consistency: an expected bound, not a guarantee; latency/staleness SLAs. §1.2, §6. |