Skip to content
About
Main content

Summary and key takeaways

The one constraint. No two machines share an observable present. Every fact one node holds about another is at least one one-way delay old, and the delay is unbounded. A slow node cannot be told from a dead one. All of this mechanism follows from this.

The one move. Stop trying to observe the property and define a checkable substitute that is an ordering claim, not a timing claim: "holder of the votes in term 7", "holder of 4", "a cut no participant can tell from an instant", "acknowledged by a ". One data structure appears under eight names (term, epoch, generation, ballot, view, map version, , attempt ID): a monotonically increasing integer, agreed once by a quorum and stamped on everything.

The guiding sentence. comes from intersection (no time). comes from (only time). Timeouts may change availability but must never be able to change correctness.

The story, in one line each (Tixora, SeatKV):

  1. A shorter timeout made failover constant and failed 40% of purchases, but sold nothing twice: timeouts only touch liveness.
  2. Adding nodes took 28 hours; a could not be split; Mumbai read stale data. Fixes: throttled copy-catch-up-cutover, salting or replicating hot keys, reads at a timestamp.
  3. Twelve seats were sold twice because the seat store did not check a fencing token; membership grew 3 to 5 in one step; two sites need a witness.
  4. The seat map had a 2-second p99 because 40-way fan-out multiplies , and in a brownout storage nodes served pages nobody was waiting for; fixes were budgeted , , absolute propagated deadlines, and reject-and-correct discovery.
  5. The post-mortem showed four faces of one problem.

What this mechanism forbids (the independent items):

  1. Telling slow from dead.
  2. Deterministic under asynchrony (FLP).
  3. Simultaneity.
  4. Mutual exclusion over a resource that does not check a token.
  5. A safe quorum over disputed membership, and majority availability in two symmetric domains.
  6. Write throughput from replication, and balance from balancing bytes.
  7. Splitting one hot key.
  8. Escaping E[max of N] by restructuring, or hedging .
  9. Bounding client staleness.
  10. A coordination-free non-monotonic invariant ().

Items 1, 3, 5 and 10 are permanent. Item 2 is permanent but escaped in practice.

The four kinds of escape:

MoveInstancesCosts
Replace timing with orderingterms, epochs, fences, map versions, attempt IDsa counter agreed once, a receiver that checks
Designate one event to mean ncommitted log entry, ownership cutover, output commita single atomic point
Batch the coordination, , in-band context, failover window or clock-drift assumption
Restate the problemCALM, , UUIDs, partial results, geographic ownershiponly when semantics permit; used last, though it is cheapest

Three currencies. Resolution has exactly three : waiting, wasted work, weakened semantics. There is no fourth; a design that seems to pay none has hidden one, usually weakened semantics.

Key numbers and formulas:

FormulaMeaning
P(slow) = 1 - (1 - p)^Nfan-out tail: N = 100 at p99 gives 63%; N = 40 gives 33%
p^Nfan-out availability: 0.999^100 ≈ 90%
L = λWa propagated deadline caps W, therefore L: free admission control
hedge at p955% extra load; slow chance 0.05 becomes 0.05² = 0.0025 (1-in-400) if independent
quorumN ≥ 2f+1; any two majorities intersect
lightabout 10 µs per kilometre of round trip

Rules to carry:

  • A lease needs a fence. Order is cheaper to agree on than time.
  • Membership is a quorum-defining set; discovery is a retryable .
  • Keep the off the data path and let the fail static; control-plane load must scale with changes, not requests.
  • Propagate and make operations ; retry policy is an overload question (retry budgets).
  • Hedge only when the is at the configured ; if it is higher, slowness is in the requests.
  • Partial results are allowed only if the aggregation tolerates a missing input.
  • Fan-out width and size pull in opposite directions: choose by whether queries touch one shard or all.

What stays unverified (each needs a test, alarm or drill): that every node holds the same membership; that the resource checks the fence on every write path; that tombstones outlive partitions; that clock drift stays within the lease assumption; that failures are as independent as 2f+1 assumes; that hedges are attempt-local; that "eventually" arrives; that the outlives the longest retry.

Claim typing. Permanent: FLP, quorum intersection, E[max of N], the lease boundary gap, unsplittable single key, CALM, the two-site result, the speed of light. Current practice: clock error bounds, partition-count defaults, EPaxos-class protocols, parallel replication apply. Economic: cross-AZ transfer prices, data residency, witness economics.

One sentence to keep: the cheapest round trip is the one your data model made unnecessary.