Choosing QuePaxa, an unusual consensus algorithm
Cloudflare's Meerkat, a globally distributed consensus service for its internal control plane, uses QuePaxa instead of Raft or Multi-Paxos. Leader-based protocols stall over wide-area networks: mistaken or slow fault detection triggers leader elections, and competing candidates can interfere destructively and cause metastable failures. QuePaxa avoids this with an optional leader, no reliance on fault detection, and randomized priorities that make proposers converge on the highest-priority proposal. It still decides in one round trip through the leader in good conditions and degrades gracefully otherwise. Its hedging timeout is not fault detection, so it can be very small (e.g., 5ms on 100ms links) without freezing the system.
Related posts
- Why does Neon use Paxos instead of Raft, and what’s the difference?
Neon hardMaster
Neon replaces Postgres's storage layer with distributed storage, so stateless compute nodes act as Paxos proposers and a fixed set of disk-backed safekeepers act as acceptors. Raft assumes uniform nodes that can each become leader, so it doesn't fit this split. Neon combines a Raft-like term-based election with Paxos-style role separation and recovery, and checks its modifications with TLA+. Competing compute nodes can stall each other, but safekeepers reject WAL from stale terms, so data stays safe while the control plane restores liveness. This avoids the slow 10-30s failovers of Patroni/etcd-style setups.
- Augmenting Flexible Paxos in LogDevice to improve read availability
Meta Engineering hardMasterLogDevice, Meta's distributed log store built on flexible Multi-Paxos, removed a core Flexible Paxos trade-off. Small write quorums had made leader election need large quorums, so routine maintenance and failures often left recovery stuck and broke read SLAs. The fix has the active leader track a reduced write set of available acceptors and persist it through a special reconfiguration write that every future leader sees during election. A quorum over that write set is then enough to elect a new leader. After rollout, stuck recoveries dropped to zero, read availability SLA misses largely disappeared, and the ZooKeeper-based membership fallback is no longer needed for leader failover, which enabled linearizable writes.
- Building and deploying MySQL Raft at Meta
Meta Engineering hardMasterMeta replaced its MySQL semisynchronous replication, whose failover and membership changes were orchestrated by external Python automation, with MySQL Raft, a Raft consensus engine built into mysqld. Control plane operations (promotions, membership changes) and data now share one replicated log, the existing binlog. That moves leadership and membership truth into the server and gives provable safety, faster failover and simpler operations, with comparable write performance. The implementation is based on a kuduraft fork that adds FlexiRaft, a Flexible Paxos-inspired scheme with a small in-region data quorum and a larger leader-election quorum, along with proxying, compression and log abstraction. The post also covers the write commit path, crash-recovery cases and one-at-a-time membership changes.
- How we built a general purpose key value store for Facebook with ZippyDB
Meta Engineering hardMasterZippyDB is Facebook's largest strongly consistent, geo-distributed key-value store, built by layering a reusable replication library (Data Shuttle) on RocksDB, Shard Manager and a ZooKeeper-based config service. Shards of 50–100 GB hold tens of thousands of μshards, enabling transparent resharding. Each shard keeps a small Multi-Paxos quorum plus async follower replicas, with epoch-based leader leases assigned externally. Consistency is chosen per request: fast-ack or quorum writes, and eventual (actually bounded-staleness), read-your-writes or lease-based strong reads. Serializable transactions use optimistic concurrency control on the primary within an epoch, and conditional writes reuse that machinery server-side.
- MySQL High Availability at GitHub
GitHub Engineering mediumAdeptGitHub replaced VIP- and DNS-based MySQL primary discovery with a decoupled pipeline: orchestrator/raft detects failures and promotes a new primary, each orchestrator node writes the new identity to its local Consul KV store, and consul-template reconfigures GLB/HAProxy writer pools reached via anycast. This removes DNS TTLs and any reliance on the failed primary's cooperation. HAProxy's short hard-stop-after kills connections to the old primary to limit split-brain, and GLB checks that the new backend is really a writer. Raft quorum placement means an isolated data center cannot lead failovers, and orchestrator advertises an ideal candidate before the replication tree is repaired, which shortens outages.