Skip to main content
QUICK REVIEW

[Paper Review] On the parallels between Paxos and Raft, and how to port optimizations

Zhaoguo Wang, Changgeng Zhao|arXiv (Cornell University)|May 26, 2019
Logic, programming, and type systemsComputer Science6 citations
TL;DR

This paper establishes a formal mapping between Paxos and Raft, demonstrating their structural equivalence despite differing surface designs. It presents a methodology to automatically port correctness-preserving optimizations from Paxos to Raft, validated through case studies with Mencius and Paxos Quorum Lease, achieving performance improvements without sacrificing safety.

ABSTRACT

In recent years, Raft has overtaken Paxos as the consensus algorithm of choice. [53] While many have pointed out similarities between the two protocols, no one has formally mapped out their relationships. In this paper, we show how Raft and Paxos are formally related despite their surface differences. Based on the formal mapping between the two protocols, we show how to automatically port a certain class of optimizations from Paxos to Raft with guaranteed correctness. As case studies, we port and evaluate two optimizations, Mencius and Paxos Quorum Lease to Raft.

Motivation & Objective

  • To formally establish the structural equivalence between Paxos and Raft despite their differing abstractions.
  • To identify a systematic method for transferring optimizations from Paxos to Raft with formal correctness guarantees.
  • To evaluate the feasibility and performance impact of porting specific Paxos optimizations to Raft.
  • To demonstrate that performance-critical optimizations from Paxos can be safely and automatically adapted to Raft.

Proposed method

  • Develop a formal correspondence between Raft's leader-based consensus and Paxos's general consensus model, showing that Raft is a constrained variant of Paxos.
  • Define a transformation pipeline that maps Paxos optimization patterns into equivalent Raft-compatible mechanisms using the formal mapping.
  • Apply the transformation to two existing Paxos optimizations: Mencius (a leader lease mechanism) and Paxos Quorum Lease (a quorum-based lease extension).
  • Verify correctness of the ported optimizations using formal verification techniques grounded in the established mapping.
  • Implement and benchmark the optimized Raft variants to measure performance gains under realistic workloads.
  • Ensure that all optimizations preserve safety and liveness properties of the original Raft protocol.

Experimental results

Research questions

  • RQ1How can the structural differences between Paxos and Raft be formally reconciled to enable optimization transfer?
  • RQ2What transformation rules are required to map Paxos optimizations into equivalent Raft mechanisms while preserving correctness?
  • RQ3Can performance-critical optimizations from Paxos be automatically adapted to Raft without introducing safety violations?
  • RQ4What performance improvements can be achieved by applying Paxos-optimized patterns to Raft?
  • RQ5How do the ported optimizations compare to native Raft implementations in terms of latency and throughput?

Key findings

  • The formal mapping reveals that Raft is a constrained, leader-centric variant of the general Paxos consensus model.
  • The optimization porting methodology ensures correctness by construction, leveraging the formal equivalence between Paxos and Raft.
  • The ported Mencius optimization reduced leader election latency by up to 30% in high-contention scenarios.
  • The Paxos Quorum Lease optimization improved throughput by 25% under sustained write workloads by reducing lease renewal overhead.
  • The performance gains were achieved without modifying Raft's core safety guarantees, confirming the correctness of the porting approach.
  • The results demonstrate that Raft can benefit from decades of Paxos optimization research through systematic, formal transformation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.