Skip to content
About
Main content

Agreement is expensive, dissemination is cheap

Which facts should go through consensus and which around it?

There are two ways to spread a fact through a cluster.

What it deliverstotal order over decisionseventual delivery, no order
Which nodes must be alivea majority, continuouslynobody in particular
Messages per factO(N), concentrated on the O(N log N) in total, spread evenly
Latency to certainty1 plus a durable writeO(log N) rounds, probabilistic
Fails bylosing availabilitylosing freshness

(O(N) means "grows in proportion to the number of nodes N"; O(N log N) grows a little faster than N. Gossip means each node periodically tells a few random peers what it knows, like a rumour spreading.)

These are not competitors. They are two channels with a price ratio of several orders of magnitude. The architecture of every large distributed data system is an allocation between them. The allocation is always the same:

A production Kafka, HDFS or Kubernetes cluster pushes kilobytes per minute through its consensus system and petabytes per day around it. The ratio is about 10⁻⁹. That ratio is the split between control plane and data plane. It is not just one item among the topics of this mechanism; it is the organizing principle.

It is also the first sight of a recurring idea: , and every other machine's correctness is defined by reference to a position in it. , terms, generations, configuration versions, ZooKeeper's transaction ids (zxids) and Raft log indices are the same thing: one small, ever-increasing integer against which everything else is checked. We call it the one designated version cell: agreement across several entries is reached by agreeing on one cell, and the leader epoch is its plainest instance.