Course contentsShow
← System Design
Lesson 608 of 1,91917. Consensus AlgorithmsFree lesson

The Problem Paxos Solves

Why distributed consensus is needed when nodes must agree on a value despite failures and network partitions.

The Problem Paxos Solves

What you'll learn: The core problem that motivated the creation of Paxos and why it's so challenging in distributed systems.

The Distributed Agreement Nightmare

Imagine a bank with multiple branches that need to agree on whether to approve a large loan. Each branch manager must vote, but some might be temporarily unreachable, messages might get delayed or lost, and managers might crash mid-vote. Yet somehow, all reachable managers must reach the same decision and never change their minds — even if more managers join later.

This is the problem Paxos solves: getting multiple nodes to permanently agree on a single value despite failures and network partitions.

Why Is This Hard?

Unlike single-server systems where one process decides, distributed systems face:

  • Node failures: Servers can crash at any moment
  • Network partitions: Nodes may be unable to communicate with each other
  • Message delays: Network packets can arrive late or out of order
  • No perfect failure detection: You can't tell if a node crashed or is just slow

Without consensus, you might have:

  • Half your database nodes thinking transaction #1234 committed
  • The other half thinking it aborted
  • Permanent data inconsistency and chaos

Paxos's Promise

Paxos provides an algorithm that guarantees:

  1. Agreement: All nodes that decide, decide on the same value
  2. Validity: The chosen value was actually proposed by some node
  3. Termination: Eventually, some value is chosen (if enough nodes are alive)

This enables building reliable systems even when individual components are unreliable.

Key Takeaway: Paxos solves the fundamental problem of getting distributed nodes to irrevocably agree on a single value despite crashes, network failures, and message loss — the foundation for building consistent distributed systems.