Skip to main content
QUICK REVIEW

[Paper Review] Microsecond Consensus for Microsecond Applications

Marcos K. Aguilera, Naama Ben-David|arXiv (Cornell University)|Oct 13, 2020
Distributed systems and fault toleranceComputer Science59 references10 citations
TL;DR

Mu proposes a high-performance, microsecond-optimized state machine replication (SMR) system that leverages RDMA one-sided writes with permission-based access control to replicate requests in under 1.3 microseconds (99th percentile: 1.6 μs), while reducing fail-over time to 873 μs (99th percentile: 945 μs), cutting prior systems' latency by over 60% and 90% respectively. The system uses a novel RDMA-based consensus protocol and a pull-score failure detection mechanism to enable fast, safe, and scalable replication for microsecond-scale applications.

ABSTRACT

We consider the problem of making apps fault-tolerant through replication, when apps operate at the microsecond scale, as in finance, embedded computing, and microservices apps. These apps need a replication scheme that also operates at the microsecond scale, otherwise replication becomes a burden. We propose Mu, a system that takes less than 1.3 microseconds to replicate a (small) request in memory, and less than a millisecond to fail-over the system - this cuts the replication and fail-over latencies of the prior systems by at least 61% and 90%. Mu implements bona fide state machine replication/consensus (SMR) with strong consistency for a generic app, but it really shines on microsecond apps, where even the smallest overhead is significant. To provide this performance, Mu introduces a new SMR protocol that carefully leverages RDMA. Roughly, in Mu a leader replicates a request by simply writing it directly to the log of other replicas using RDMA, without any additional communication. Doing so, however, introduces the challenge of handling concurrent leaders, changing leaders, garbage collecting the logs, and more - challenges that we address in this paper through a judicious combination of RDMA permissions and distributed algorithmic design. We implemented Mu and used it to replicate several systems: a financial exchange app called Liquibook, Redis, Memcached, and HERD. Our evaluation shows that Mu incurs a small replication latency, in some cases being the only viable replication system that incurs an acceptable overhead.

Motivation & Objective

  • Address the critical performance gap in traditional SMR systems, which incur hundreds of microseconds of overhead, making them unsuitable for microsecond-scale applications in finance, embedded systems, and microservices.
  • Reduce replication and fail-over latencies to levels compatible with microsecond applications, where even small overheads are prohibitive.
  • Design a new SMR protocol that achieves consensus and replication in a single round of one-sided RDMA operations, eliminating multi-round communication and two-sided messaging.
  • Enable fast, reliable failure detection using a pull-score mechanism over RDMA that avoids false positives from network jitter, allowing aggressive timeouts.
  • Achieve both low common-path latency and low fail-over time—challenging the folklore of a trade-off between fast replication and fast fail-over.

Proposed method

  • Use RDMA one-sided write operations to replicate a request directly to the log of each replica in a single communication round, eliminating round-trip communication with followers.
  • Enforce exclusive write access to each replica’s log using RDMA write permissions, preventing concurrent leaders from corrupting the log.
  • Implement a pull-score failure detection mechanism where replicas periodically read a heartbeat counter from the leader using RDMA; failure is declared if the score (consecutive identical reads) exceeds a threshold.
  • Use a lightweight leader change protocol based on RDMA permission updates, which are atomic and efficient on modern RDMA-capable NICs.
  • Design a state machine replication framework that supports generic applications, including logging, state management, client coordination, and instance lifecycle management.
  • Integrate optimizations from prior RDMA best practices, such as minimizing system calls and using memory-mapped I/O, to reduce CPU overhead and improve end-to-end latency.

Experimental results

Research questions

  • RQ1Can a state machine replication system achieve sub-microsecond replication latency for microsecond-scale applications using only one-sided RDMA operations?
  • RQ2How can RDMA permissions be used to prevent concurrent leader writes without requiring multi-round communication or two-sided messaging?
  • RQ3Can failure detection be made fast and accurate at microsecond timescales without relying on network timeouts that cause false positives?
  • RQ4Is it possible to achieve both low replication latency and low fail-over time simultaneously, defying the traditional trade-off between fast path and slow path performance?
  • RQ5To what extent can a fully functional SMR system be built using only one-sided RDMA operations and permission-based coordination?

Key findings

  • Mu replicates a small request in less than 1.3 microseconds on average, with the 99th percentile at 1.6 microseconds—representing a 61% reduction in replication latency compared to the fastest prior system.
  • Fail-over time is reduced to 873 microseconds (99th percentile: 945 μs), cutting prior systems’ fail-over times by at least 90%, with the fastest prior system (HovercRaft) taking 10 milliseconds.
  • The system achieves consensus and replication in a single round of parallel RDMA writes, eliminating the need for multiple communication rounds or two-sided operations.
  • The pull-score failure detection mechanism enables failure detection in approximately 600 microseconds on average, limited primarily by process scheduling variance, not network jitter.
  • Mu’s use of RDMA permissions enables safe, single-round replication without race conditions, even under concurrent leader scenarios, by ensuring only one leader can write to a replica’s log at a time.
  • Evaluation on real-world systems—including Liquibook, Redis, Memcached, and HERD—demonstrates that Mu is the only viable replication system for microsecond apps due to its minimal overhead.

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.