Technology1 min read

Choosing QuePaxa, an unusual consensus algorithm

By · Published by Everything Blog

In short

Meerkat relies on a consensus-powered log of events to build key-value stores similar to Apache ZooKeeper, Consul, and etcd. Traditional algorithms like Raft and Paxos struggle on global networks because a single leader's network issues can stall an entire system. Cloudflare experienced this weakness firsthand in 2020 when a network switch failure slowed its dashboard by 80 times and disabled writes for six hours. The adoption of QuePaxa eliminates the single-leader bottleneck to ensure steady progress even amidst broken connections.

Key points

  • The QuePaxa algorithm avoids relying on a single leader to maintain continuous system pro…: The QuePaxa algorithm avoids relying on a single leader to maintain continuous system progress across wide-area networks.
  • Established algorithms like Paxos, Raft, and Viewstamped Replication remain vulnerable to…: Established algorithms like Paxos, Raft, and Viewstamped Replication remain vulnerable to global network latency spikes and disconnects.
  • Designing consensus for internet-scale infrastructure requires handling volatile connecti…: Designing consensus for internet-scale infrastructure requires handling volatile connections rather than solely tolerating complete server outages.

Sources checked by our analysis pipeline: 1

Cloudflare recently announced Meerkat, an experimental distributed consensus service designed to manage our internal global control plane. It is powered by a new consensus algorithm called QuePaxa.

QuePaxa is an unusual choice; most consensus systems use well-established consensus algorithms like Raft, (Multi-)Paxos or Viewstamped Replication. These algorithms are well understood, have mature implementations, and usually work well.

Unfortunately, common consensus algorithms often suffer in wide-area networks with volatile network connectivity and latency, i.e., networks like the Internet, which is where Meerkat runs. These algorithms rely on a single leader process being available and having predictable latency. If the leader goes down, experiences higher latency than usual, or is disconnected, the entire consensus system slows down or becomes unavailable until the leader is replaced. This is unacceptable for Meerkat.

Meerkat’s global deployment environment led us to a newer consensus algorithm, QuePaxa, which promises better stability despite volatility, in large part by not relying on a leader to make progress. In this post we’ll explain why we chose QuePaxa and how the QuePaxa algorithm works.

What we’re building and why it’s unique

Technology