Skip to main content
QUICK REVIEW

[Paper Review] LogPlayer: Fault-tolerant Exactly-once Delivery using gRPC Asynchronous Streaming

Mohammad Roohitavaf, Kun Ren|arXiv (Cornell University)|Nov 25, 2019
Advanced Data Storage TechnologiesComputer Science5 citations
TL;DR

This paper presents LogPlayer, a gRPC-based system for fault-tolerant, in-order, exactly-once delivery of transactional log entries to backend storage shards. It uses asynchronous streaming and a recovery mechanism to ensure durability and correctness even during failures, achieving sub-millisecond latency and outperforming Apache Kafka by up to 6x in tail latency for exactly-once semantics.

ABSTRACT

In this paper, we present the design of our LogPlayer that is a component responsible for fault-tolerant delivery of transactional mutations recorded on a WAL to the backend storage shards. LogPlayer relies on gRPC for asynchronous streaming. However, the design provided in this paper can be used with other asynchronous streaming platforms. We model check the correctness of LogPlayer by TLA+. In particular, our TLA+ specification shows that LogPlayer guarantees in-order exactly-once delivery of WAL entries to the storage shards, even in the presence of shards or LogPlayer failures. Our experiments show LogPlayer is capable of efficient delivery with sub-millisecond latency, and it is significantly more efficient than Apache Kafka for designing a WAL system with exactly-once guarantee.

Motivation & Objective

  • To design a fault-tolerant system for delivering transactional mutations from a Write-Ahead Log (WAL) to distributed storage shards with exactly-once semantics.
  • To ensure in-order delivery and resilience against shard or LogPlayer failures using asynchronous streaming.
  • To provide a high-performance alternative to existing streaming platforms like Apache Kafka for WAL systems requiring exactly-once delivery.
  • To formally verify correctness using TLA+ to detect and fix design flaws before implementation.
  • To enable scalable, strictly serializable transaction processing in distributed systems like eBay’s GRIT and JanusGraph.

Proposed method

  • LogPlayer uses gRPC asynchronous streaming to continuously fetch WAL entries from a log service via a fetcher component.
  • Entries are dispatched to target-specific queues, enabling independent processing per storage shard and preventing slow targets from blocking others.
  • A health monitor detects failed or disconnected targets and suspends queueing until recovery, triggering ad hoc recovery streams for missed entries.
  • Recovery streams replay only the missing log ranges, ensuring idempotent and in-order delivery upon target restart.
  • The system leverages completion queues in gRPC to decouple stream processing from network I/O, enabling high throughput and low latency.
  • Correctness is formally verified using a TLA+ PlusCal specification that models failure scenarios and proves in-order, exactly-once delivery.

Experimental results

Research questions

  • RQ1Can a gRPC-based streaming architecture achieve fault-tolerant, in-order, exactly-once delivery of WAL entries to distributed storage shards?
  • RQ2How does the performance of such a system compare to Apache Kafka when both enforce exactly-once semantics?
  • RQ3What mechanisms are required to ensure idempotent recovery after target failures without reprocessing or missing entries?
  • RQ4Can formal verification with TLA+ detect and prevent subtle consistency bugs in the design phase?
  • RQ5What is the impact of system configuration (e.g., number of targets, transaction size) on end-to-end latency and scalability?

Key findings

  • LogPlayer achieves sub-millisecond median and average delay in all experiments, with both median and average latency under 1 millisecond.
  • For transactions with 10 KB payloads spanning 10 shards, LogPlayer is on average 4 times faster than Kafka with exactly-once semantics.
  • Regarding 99th percentile tail latency, LogPlayer is 6 times faster than Kafka when using exactly-once guarantees.
  • The system remains stable under high load and scales efficiently, with no significant increase in delay even as the number of targets grows.
  • The TLA+ model check uncovered multiple design flaws in the initial architecture, which were resolved in the final algorithm.
  • A Kafka-based design with two-level topics (WAL topic + shard topics) exhibited unbounded delay growth due to lack of backpressure, making it impractical for production WAL systems.

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.