Abstract
State machine replication (SMR) is essential for fault-tolerant distributed systems, yet traditional consensus protocols introduce latencies that are orders of magnitude higher than the processing times of modern microsecond-scale applications. This paper presents Mu, a novel SMR system that achieves sub-1.3 microsecond replication latency and sub-millisecond fail-over. By leveraging one-sided RDMA operations and hardware-level memory permissions, Mu removes the CPU from the replication critical path and significantly reduces fail-over times compared to existing state-of-the-art systems.
Introduction
In domains such as high-frequency trading, real-time control systems, and high-performance microservices, applications often process requests in under 10 microseconds. To ensure fault tolerance, these "microsecond apps" must be replicated across multiple machines. However, conventional consensus protocols like Paxos or Raft typically add hundreds of microseconds of overhead, creating a significant performance bottleneck. Even RDMA-optimized systems often suffer from high tail latencies and slow fail-over times (10–150 ms) due to conservative timeout mechanisms. Mu addresses these challenges by rethinking the integration of Remote Direct Memory Access (RDMA) into the consensus process.
System Architecture
Mu’s design is centered on the separation of concerns between the critical replication path and the background control path. This is formalized through a two-plane architecture: the replication plane and the background plane.
The replication plane handles the high-frequency task of logging requests to followers. It utilizes a "replicator" on the leader and a "replayer" on the follower. The background plane manages lower-frequency control tasks such as leader election and permission management. By isolating these planes, Mu ensures that control logic does not interfere with the latency-sensitive replication process.
Core Mechanisms
Mu achieves its performance through three primary innovations:
1. One-Sided Replication
Unlike traditional systems where followers' CPUs must process incoming log entries, Mu uses one-sided RDMA Writes. The leader "pushes" data directly into the memory logs of followers. This bypasses the follower's CPU entirely, eliminating context-switching and processing delays on the critical path.
2. Hardware-Enforced Permissions
To prevent "split-brain" scenarios without complex message passing, Mu utilizes RDMA memory permissions. A follower grants write access to exactly one leader at a time. During a view change, a new leader must revoke the previous leader's hardware-level permissions before it can write to the logs. This effectively uses the NIC hardware as a distributed lock.
3. Pull-Based Failure Detection
Traditional heartbeat mechanisms are "push-based" and sensitive to network jitter, leading to slow, conservative timeouts. Mu reverses this: followers "pull" a heartbeat counter from the leader’s memory via RDMA Reads. They maintain a "badness score" based on successive identical reads. This approach allows for aggressive failure detection (detecting crashes in ~600µs) because network delays merely slow down the detection rather than triggering false positives.
Evaluation and Results
Mu was evaluated on a 4-node cluster with 100 Gbps Infiniband, integrated with real-world applications including Liquibook (a financial exchange), Redis, and Memcached.
- Latency: Mu achieves a median replication latency of less than 1.3 µs, with a 99th percentile of 1.6 µs. This represents a 61% improvement over systems like Hermes or DARE.
- Fail-over: The system recovers from leader failure in a median of 873 µs, a 90% improvement over the 10-150 ms typical of prior work.
- Throughput: Mu supports up to 47 million operations per second with batching, effectively saturating the network bandwidth.
For the Liquibook financial exchange, Mu adds only 35% overhead, compared to over 100% for competing systems, making it the first viable replication solution for such high-speed environments.
Performance Trade-offs and Limitations
While Mu provides unprecedented performance, it is currently limited to RDMA-capable hardware (Infiniband or RoCE) and in-memory operation. A key technical challenge identified is the latency of changing RDMA permissions.
As shown in the evaluation of permission revocation techniques, modifying Queue Pair (QP) flags is the most efficient method, taking approximately 100 µs regardless of log size. In contrast, Memory Region (MR) reregistration scales linearly with memory size, becoming prohibitively slow for large logs. Mu optimizes for this by using QP flags, though the authors note that further NIC-level optimizations could drive fail-over times even lower.
Conclusion
Mu demonstrates that by offloading the consensus critical path to one-sided RDMA operations and using hardware-level permissions for safety, it is possible to achieve replication latencies that match the requirements of microsecond-scale applications. Its sub-millisecond recovery time sets a new standard for high-availability systems in low-latency environments.
Summary updated