Curious Minds

Clear answers to science and history questions

Multi Paxos Why the Name Explained

· 5 min read · Science

Multi-Paxos is called "multi" because it extends the original Paxos consensus algorithm to efficiently handle multiple instances of consensus, not just one. Instead of running the full Paxos protocol separately for each decision, Multi-Paxos optimizes repeated agreement by reusing leadership and reducing message rounds across a sequence of values.

Background of the Paxos Algorithm

  • The Paxos algorithm, introduced by Leslie Lamport in the late 1980s, solves the problem of achieving consensus in distributed systems where processes may fail or messages may be lost.
  • Consensus means getting a group of machines to agree on a single value, even in the face of failures. This is essential for building reliable systems such as databases, configuration stores, and distributed ledgers.
  • The original Paxos protocol is designed to agree on one value in a single execution. This is known as a "single-decree Paxos" or simply "Paxos."
  • In practice, systems often need to agree on a series of values—like a log of commands in a replicated state machine—so running Paxos once per value becomes inefficient.
  • To address this, the concept of Multi-Paxos emerged as a practical optimization for repeated consensus.

How Single Paxos Works

Before understanding why Multi-Paxos is called "multi," it's essential to review how basic Paxos operates. The protocol involves three roles: proposers, acceptors, and learners. It proceeds in two phases:

  1. Phase 1 (Prepare and Promise): A proposer sends a "prepare" message with a unique proposal number to a majority of acceptors. If an acceptor hasn’t seen a higher-numbered proposal, it promises not to accept any lower-numbered ones and replies with any previously accepted value.
  2. Phase 2 (Accept and Learn): If the proposer receives promises from a majority, it chooses a value (either from the responses or a new one) and sends an "accept" request. Acceptors that haven’t promised a higher number accept it. Once a majority accepts, the value is decided.

This process ensures safety (only one value is chosen) even if multiple proposers compete. However, it requires two message round trips per decision, making it costly when many values must be agreed upon in sequence.

How Multi-Paxos Improves Efficiency

Multi-Paxos optimizes repeated consensus by recognizing that if a stable leader (a proposer) is elected, it can skip the first phase for subsequent decisions. After the initial agreement, the same leader can propose multiple values without re-running Phase 1 each time.

  • The first instance (often called the "configuration" or "setup" round) runs full Paxos to elect a leader and agree on the initial value.
  • Subsequent instances assume the same leader remains active and sends accept requests directly, effectively reducing the protocol to one round trip per value.
  • This optimization relies on a stable network and leader—meaning no frequent leader changes or partitions.
  • If the leader fails or becomes unreachable, a new leader election occurs, typically using standard Paxos for the next instance, restoring safety.

Because it manages multiple consensus instances under one overarching coordination framework, it’s called "Multi-Paxos"—"multi" referring to the multiple values or log entries it handles, not multiple algorithms or protocols.

Safety and Liveness in Multi-Paxos

Despite optimizations, Multi-Paxos maintains the core safety guarantees of Paxos: only one value is chosen for each instance, and once chosen, it cannot be changed. This is preserved through careful use of proposal numbers and quorum intersection.

  • Safety holds as long as a majority of acceptors are available and do not accept conflicting proposals.
  • Liveness—progress toward agreement—depends on having a single, stable leader. Frequent leader changes or network instability can degrade performance.
  • Multi-Paxos does not weaken safety, even when skipping Phase 1; it assumes the elected leader will not conflict with prior decisions.
  • If a new leader takes over, it must first run Phase 1 to learn any previous accepted values before proposing new ones, ensuring continuity.

Thus, the "multi" extension does not compromise correctness—it enhances efficiency while preserving the algorithm’s fault-tolerant foundation.

Multi-Paxos vs. Other Consensus Algorithms

Multi-Paxos is often compared to Raft and other consensus protocols designed for practical replication.

  • Raft: Designed to be more understandable than Paxos, Raft explicitly separates leader election, log replication, and safety. It is similar in efficiency to Multi-Paxos but structures the process more clearly.
  • Classic Paxos: Refers to single-decree Paxos. Multi-Paxos is an optimization pattern applied to it, not a separate algorithm.
  • Vertical Paxos: Addresses reconfiguration of the participant set, which standard Multi-Paxos does not handle natively.
  • Fast Paxos: Reduces message delays in some cases but requires more acceptors and increases complexity.

Multi-Paxos remains widely used in systems like Google’s Chubby and Apache Cassandra due to its efficiency in stable environments.

Frequently Asked Questions

Is Multi-Paxos a different algorithm from Paxos?

No, Multi-Paxos is not a separate algorithm but an optimization pattern applied to the original Paxos protocol. It uses the same core rules and message types but reuses the leader across multiple consensus instances to reduce overhead.

Why not always use Multi-Paxos instead of single Paxos?

Multi-Paxos is most effective when a stable leader can be maintained. In highly volatile networks with frequent failures or partitions, the cost of leader instability can negate its benefits. Single Paxos may be preferred in such cases for simplicity and predictability.

Does Multi-Paxos require a fixed set of servers?

Yes, standard Multi-Paxos assumes a fixed configuration of participants (proposers, acceptors, learners). Changing membership requires additional mechanisms, such as reconfiguration protocols or external coordination, which are not part of basic Multi-Paxos.

Can multiple leaders exist in Multi-Paxos at the same time?

Temporarily, yes—due to network delays or failures—but the protocol ensures that only one leader can successfully commit values. Conflicting proposals are resolved through proposal numbering and quorum rules, preventing conflicting decisions from being accepted.

Is Multi-Paxos used in real systems?

Yes, Multi-Paxos is used in several production systems, including Google’s Chubby lock service and Microsoft’s Autopilot configuration system. Its efficiency in steady-state operation makes it suitable for replicated state machines in data centers.

What happens if the Multi-Paxos leader fails?

If the leader fails, the system waits for a timeout and initiates leader election for the next instance using standard Paxos. Once a new leader is elected, it resumes proposing values, ensuring progress continues safely.

In this article
  1. Background of the Paxos Algorithm
  2. How Single Paxos Works
  3. How Multi-Paxos Improves Efficiency
  4. Safety and Liveness in Multi-Paxos
  5. Multi-Paxos vs. Other Consensus Algorithms
  6. Frequently Asked Questions