Why "eventually" has no clock

staleness ~ downtime + handoff + divergence

Eventual consistency promises repair given enough work, never within a fixed amount of time, so any deadline must be bought on the read path.

Leaderless replication does not give eventual consistency a clock. Replicas repair stale data through background work whose volume depends on how much they disagree, so a replica can stay stale for an unbounded interval of wall time. Any freshness promise a system makes must therefore come from the read path, where a quorum forces the newest value to be checked during the request.

Two repair mechanisms run in a leaderless cluster, and they spend different budgets. Read repair works on the read path. A writer sends a value to two of three nodes, a reader contacts the third, sees the value missing, and writes it back. The repair rides a trip the read was already making, so it only touches keys that someone reads. Anti-entropy runs in the background. Replicas exchange Merkle trees, compare hashes down the tree, and descend only into ranges that differ. The cost of that comparison is logarithmic in range size, and the transfer of repair data is proportional to how much data diverges. Read repair waits for a read, and anti-entropy waits for its turn in the background.

The abstraction hides what sets the wait. Repair does not start until the failed node returns and membership settles, so the window depends on downtime, which nobody can bound in advance. Take a node that is down for hours. Writes get hinted to other replicas, the cluster stays available, and dashboards stay green. When the node returns, reads that land on it can return values that are hours old until the hinted data drains onto it. Draining competes with live traffic for disks and network, so it slows under load. Sloppy quorums add a second gap: an acknowledged write can sit outside the key's owner set, so a read of the owners legitimately misses it. Every step works as designed, and the question when will it be consistent? still has no answer on a clock.

Do not expect anti-entropy to supply a deadline. Move each promise you need onto something you can count. Keep per-key versions so a read can report how far behind it is. Route reads that matter, such as a user's own writes, to a replica known to be at or beyond their version, or require a quorum and accept the round trip. Run anti-entropy on an explicit schedule with a stated work budget. Alert on the time since the last completed comparison for each range, because that is the only clock you can define. Measure the lag you actually see as a distribution, and publish that distribution instead of the word eventually. If an SLA needs a number, put the number on the read path, where latency buys it.

orders of magnitude
Tree comparison
logarithmic in range size

Replicas compare Merkle hashes top-down and descend only into differing ranges. That locates a small mismatch cheaply.

Repair transfer
proportional to divergence

Only keys that differ move, so cost tracks disagreement rather than how long the cluster has run.

Node downtime
hours

A node can stay out for hours, and repair for its data cannot start until it returns.

Anti-entropy completion
no deadline

The bound is on work, so a pass has no promised finish time in wall clock.

Read repair scope
keys the read touches

A read repairs only the replicas it contacts, so an unread key can stay stale indefinitely.

field note

The naive design treats eventual consistency as a schedule. A write is acknowledged once a quorum of replicas holds it, and the team assumes the rest catch up shortly. A node that is down for hours receives no repair for its data until it returns, so the lag is set by downtime rather than by the algorithm.

The fix was anti-entropy. Replicas compare ranges with Merkle trees and repair only the divergent parts, so the work tracks divergence and stays affordable. The pass runs asynchronously, and the design sets no completion deadline for it. Making a pass faster does not promise when one ends.

The lesson is that eventual names a state, not a clock. Any freshness promise has to sit on top of the system, either by routing reads to a replica at a known position or by measuring the lag the product can tolerate. The team that measures lag per range can alert on it, which is the only clock the design allows.