L3VLUP
Atlas

FrameworkSoftware engineering

Consensus is agreeing on one value when any machine may crash and the network may lie

Martin Kleppmann · Distributed Systems 6.1: Consensus

The idea

Several machines need to agree on a single value, the next entry in a log, which node is the leader, whether a transaction committed. Any of them may crash, and the network may delay or drop messages so that a live node is indistinguishable from a dead one. Kleppmann's lecture shows that consensus and total order broadcast are the same problem in different clothes, then sets out the system models under which it can be solved at all. The protocols you have heard of, Raft and Paxos, are solutions under particular assumptions, and knowing the assumptions is what lets you say when a system's guarantee holds.

Ask what a consensus protocol assumes about crashes and the network; its guarantee is only as strong as those assumptions.

When it works

Distributed systems interviews, database replication questions, and any design that claims strong consistency across machines.

When it may fail

Consensus is slow and expensive, and many systems deliberately avoid it by accepting weaker guarantees. Knowing when not to need it is as much the skill as knowing how it works.

How to use it

When a design uses a leader, say how the leader is chosen, what happens when it is partitioned from the others, and whether two leaders can exist at once. Those three questions are the consensus problem in interview form.

Where it came from

Video Distributed Systems 6.1: Consensus · Martin Kleppmann (Cambridge)

What the source says. Kleppmann shows that consensus and total order broadcast are equivalent problems, then sets out the system models under which consensus can be solved.

Open the source at 3:07 to 10:17 (opens in a new tab)Checked against the clip · reviewed 2026-10-16

Connected ideas

Concepts

Put it to work on L3VLUP

More like this