Skip to main content
QUICK REVIEW

[Paper Review] CASPaxos: Replicated State Machines without logs

Denis Rystsov|arXiv (Cornell University)|Feb 20, 2018
Distributed systems and fault toleranceComputer Science9 references9 citations
TL;DR

CASPaxos is a leaderless, wait-free, linearizable replicated state machine protocol that eliminates logs by directly replicating state via an extended Synod protocol, achieving low latency, high concurrency, and improved fault tolerance. It reduces write amplification and hardware overhead, with a prototype demonstrating 47ms latency in WAN deployments—significantly outperforming leader-based systems like Etcd and MongoDB.

ABSTRACT

CASPaxos is a wait-free, linearizable, multi-writer multi-reader register in unreliable, asynchronous networks supporting arbitrary update operations including compare-and-set (CAS). The register acts as a replicated state machine providing an interface for changing its value by applying an arbitrary user-provided function (a command). Unlike Multi-Paxos and Raft which replicate the log of commands, CASPaxos replicates state, thus avoiding associated complexity, reducing write amplification, increasing concurrency of disk operations and hardware utilization. The paper describes CASPaxos, proves its safety properties and evaluates the characteristics of a CASPaxos-based prototype of key-value storage.

Motivation & Objective

  • Address the complexity and availability limitations of leader-based consensus protocols like Multi-Paxos and Raft.
  • Reduce write amplification and improve disk I/O concurrency by eliminating log replication.
  • Achieve high availability and low latency in asynchronous, unreliable networks without a single point of failure.
  • Provide a simpler, provably correct alternative to Multi-Paxos and Raft for building distributed state machines.
  • Demonstrate that state replication can be as efficient and safe as log-based replication, with practical performance benefits.

Proposed method

  • Extend the Synod protocol (Single-Decree Paxos) to directly replicate state instead of logs, eliminating the need for log composition.
  • Use a compare-and-set (CAS) operation as the atomic primitive for state updates, enabling safe concurrent writes.
  • Maintain a symmetric, peer-to-peer architecture where all replicas are equivalent, avoiding leader election and failure points.
  • Allow independent, out-of-order writes to different state components, increasing disk I/O concurrency and hardware utilization.
  • Formally prove safety and linearizability using TLA+ and a mathematical proof in the appendix.
  • Implement a prototype key-value store (Gryadka) to evaluate performance and fault tolerance in real-world WAN conditions.

Experimental results

Research questions

  • RQ1Can a replicated state machine be built without maintaining a log of commands, while preserving safety and linearizability?
  • RQ2How does eliminating logs affect write amplification, disk I/O concurrency, and hardware utilization in distributed systems?
  • RQ3Can a leaderless consensus protocol achieve lower latency and higher availability than leader-based protocols like Raft and Multi-Paxos?
  • RQ4What is the performance impact of direct state replication compared to log-based replication in geographically distributed deployments?
  • RQ5To what extent does the absence of a leader improve fault tolerance during network partitions or node failures?

Key findings

  • CASPaxos achieved an average latency of 47ms for read-modify-write operations in a WAN deployment across three Azure regions, significantly lower than Etcd (679ms) and MongoDB (1086ms).
  • The protocol demonstrated graceful degradation and less than 1 second of unavailability during leader isolation, in contrast to Raft-based systems like Etcd (1s) and CockroachDB (7s).
  • The implementation was under 500 lines of code, demonstrating a substantial reduction in complexity compared to Multi-Paxos and Raft implementations.
  • Write amplification was reduced due to direct state replication, improving disk I/O efficiency and hardware utilization.
  • The protocol achieved optimal commit latency in wide-area networks by eliminating request forwarding to a central leader.
  • Formal verification via TLA+ and a mathematical proof confirmed the safety and linearizability of CASPaxos, validating correctness despite its simplicity.

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.