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 ancient Greek libraries, each consulting only a few of the others, judged how likely a copy was to be out of date.
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
A data item is kept at N replicas. A write is acknowledged once W of them have it, and a read returns the newest of the first R answers.
We tell it with one work kept at three libraries, a writer, a reader, and couriers who take as long as they take.
Each read comes straight after a write. Which replicas answer first is drawn at random.
On the scholars' coast a library answers a reader from whatever copy it holds, and lives with copies that differ for a while.* Some works are kept at more than one library.
A work kept at three libraries has three home libraries, and every copy of it on the coast is held by one of them. Each copy is an edition with a tally, the day and hour it was written, and of two editions the larger tally is the newer.
A writer sends a courier to each home library with a new edition. A home library that receives it enters it and sends a courier back to say so. When enough home libraries have answered, the writer announces the edition and regards it as done. The couriers still on the road keep walking.
A reader writes to all three home libraries and takes the newest copy among the first few replies, without waiting for the rest.
So there are two numbers: how many home libraries a writer waits for, and how many replies a reader takes. Nothing in the replies says whether the home libraries heard from are ones the edition has reached.

Waiting for all three home libraries and asking all three makes the slowest courier decide how soon anything is done. One slow road or one stopped courier holds up everyone.
Waiting for fewer is quicker. The risk is that the home libraries the writer waited for and the home libraries the reader heard from share no library.
Gold home libraries hold the new edition. Ringed home libraries are the ones the reader hears from first.
A decree passes in the Chamber when a majority hold it, and any two majorities share a member.* The same holds for home libraries. With three, waiting for two and taking two is enough: the reader always hears from a home library that has the announced edition, and takes the newest copy heard.
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.
Smaller numbers are chosen for speed. The paper observes that real systems with three copies often wait for one and ask one, on purpose: the quicker answers matter more to them than an old copy now and then. On the coast that is the quick way.
Suppose the home libraries that answer the writer, and the home libraries the reader hears from, fall as if by lot. With three home libraries and the quick way, the edition is at one home library and the reader's home library is one of the three. The reader misses it two times in three.
With more home libraries the odds improve quickly, if the two numbers grow with them. Two groups drawn from a large crowd are very unlikely to share no one.
The page works these out from the count of the ways the reader's home libraries can all lie among those the edition 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).
The odds are excellent for a coast with a hundred home libraries of each work. A work on this coast has three, and the paper notes that real systems keep one to three copies. Nothing about the large case helps the small one. But a reader usually asks something narrower than is this the newest?
A reader who will take any of the newest few editions is let down only if the home libraries heard from lack every one of them.
Each announced edition went to its own group of home libraries, and the reader's group has the same chance of missing each. So the chance of missing the newest two is the chance of missing one, multiplied by itself, and so on. The chance of an old copy falls away fast with every edition of leeway.
Worked out from the rule: one chance of a miss for each edition 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.
There is a second gain. A library that need not return the newest edition need not ask as many home libraries, so the busiest home library is asked less often, and the same libraries can serve more readers.
These odds ignore time. They would be the same a moment after the announcement or a week after, and yet the couriers still on the road are still arriving.
The edition was sent to all three home libraries at the start, so after the announcement it goes on reaching those that had not answered. A reader who comes a while later asks home libraries of which more have it.
The visibility of an edition after a while is the chance that a reader who comes that long after the announcement is handed the edition or a newer one.
What decides it is how many home libraries hold the edition at that moment. If all three do, no reader can miss it. If only the first to answer does, the odds are those of the quick way. In between, the chance of a miss is the chance that the reader's home libraries are all among those that lack it.
If a second edition is announced before the first has finished arriving, the first no longer matters: a reader handed the second is handed something newer.
A reader handed an edition that is written but not yet announced is handed something newer than the announced one, not older.
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).
For one of the newest few editions, a while after the announcement, a cautious rule of thumb is one such answer for each edition, all multiplied together. A reader may trade one kind of leeway for the other. What is left to understand is how many home libraries hold the edition at a given moment.

Four journeys are in every writing and reading, and each takes a time that varies from courier to courier.
The edition's way out from the writer to a home library. The acknowledgment's way back. The request's way out from a reader to a home library. The copy's way back to the reader.
A home library's reply is stale when the reader's request reaches the home library before the edition does. The home library then has only the old edition to give. The reader is handed an old copy only if that is so for every one of the first replies taken.
The chance cannot be written down in one line, as the chance for editions was, and the paper says so. The moment of announcement depends on the first few journeys out and back, the reader's replies on the first few requests and copies, and the two overlap. So the odds are found by playing the situation over many times, drawing each journey's time from the couriers' logbook, and counting how often the reader is behind.
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.
The replay can be trusted as far as it was tested. The authors checked it against a working system they set up, with chosen journey times for each leg. Across fifty thousand writings, the predicted chance of seeing the edition after each moment differed from the measured by well under one part in a hundred on average.
The first finding is which journey matters: the edition's way out. The slower and more uneven it is, the longer a reader must wait for near certainty, and its unevenness matters more than its average.
With three home libraries and the quick way, when the way out was very quick and even, a reader was handed the edition nine times in ten at the moment of the announcement. When it was ten times slower than the other legs, only four times in ten.
The paper then turned to the logbooks of two large systems, and took four coasts from them.
These are the paper's measures. The page does not work them out.
On the coast where the way out now and then takes very long, the odds at once are good, and the climb to near certainty takes the longest of the four.
On the slow-copying coast the chance at once falls from about 58 in a hundred with two home libraries to about 21 with ten. The time to near certainty rises by only about a fifth.
On the long-tailed coast, taking a second reply cut the wait for near certainty to about a seventh, and writer and reader together were still about four-fifths faster than the fastest way with no chance of a miss.
A reader who comes back to a work may not mind a copy that is not the newest. Finding a copy older than the one read last time is another matter.
The editions that will do are the one seen last time and every edition announced since. So this is leeway in editions again: one, plus the number announced between visits. A reader who visits seldom has the widest range and the best odds. A reader who visits all the time has the narrowest.
A home library's copy only ever moves forward, so a reader who always asks the same home library is never handed anything older than before, unless that home library is lost. A library may also limit how often a reader comes, to bring the odds where it wants them.
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.
A library can tell a reader the odds. Four things it cannot say.

The library cannot say. It can say nine times in ten you are handed the newest, and nearly always one of the newest few. With the quick way a reader can be handed an old copy of any age: nothing in the numbers bounds how old, and the paper says so.
That home libraries answer as if by lot; that the couriers' journeys are alike and drawn afresh each time, as the logbook records them; that no library is closed and no courier stopped. They also count no festival, no word of mouth and no reader who puts a lagging home library right, so the real odds are better.
Not when it is handed over. Afterwards, a late reply with a newer tally shows the copy was behind. Even that can mislead harmlessly: the later reply may carry an edition written after the request, or one not yet announced.
A reader who must see a letter before its reply needs another kind of promise, which the paper leaves aside. It also leaves as a suggestion that a coast could set its two numbers by what it measures, and offer the quickest way that still meets stated odds.
Every home library is a replica, and the two numbers are the write and read quorums. Hover or tap to see who is who.
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 The Scholars' Coast
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.
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.
| a work'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. |
| an edition 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 edition 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 edition 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 editions; 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 edition 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 edition | 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. |