Consensus

Getting several machines to agree on one value despite failures. It needs a majority, so a cluster of 2f + 1 nodes tolerates f failures, and it is what makes leader election and distributed SQL safe.

Where it shows up in real systems

  • Distributed SQL

    Each write is committed through a consensus protocol (Raft or Paxos), so it is never lost and every read is up to date, even across regions. The price is latency: a write must reach a majority of replicas, and across regions that means tens of milliseconds.

    In production: Google Cloud Spanner, CockroachDB, YugabyteDB, TiDB, Amazon Aurora DSQL

  • Coordination service

    Runs Raft or ZAB on an odd number of nodes: three nodes survive one failure, five survive two. Use it for small, critical data, never as a general database.

    In production: etcd, Apache ZooKeeper, Consul KV

See it break, then fix it

Build an architecture, send it a day of traffic and outages, and learn why it holds or fails. Free to start.