Table of Contents
Fetching ...

K2: On Optimizing Distributed Transactions in a Multi-region Data Store with TrueTime Clocks (Extended Version)

Haoze Song, Yongqi Wang, Xusheng Chen, Hao Feng, Yazhi Feng, Xieyun Fang, Heming Cui, Linghe Kong

TL;DR

K2 tackles the problem of achieving high-throughput, strictly serializable transactions across geo-distributed data stores by deeply co-designing with TrueTime clocks. It introduces three innovations: K2-TB, a timestamp batching mechanism that delivers up to $10^5$ timestamps/s per core with an uncertainty bound around $400\mu s$; K2-MVTO, a TTC-based multi-version timestamp-ordering protocol that uses a single start timestamp to reduce commit-waits and enable early writes; and K2-VCR, an epoch-based visibility control protocol that allows reads at replicas with low latency while guaranteeing atomic visibility. Empirical results show K2-TB enhances timestamping performance by orders of magnitude over strawman approaches, and K2-MVTO delivers up to $2.32\times$ the throughput of MVTO-HLC and $9.82\times$ that of d2PL-TTC on TPC-C, with YCSB-T and replica-read benchmarks confirming lower visibility delays and robust performance across workloads. These contributions enable scalable, strongly consistent geo-distributed transactions, with practical deployment guidance such as epoch lengths around $100\text{ ms}$ and TTC-based architectures optimized for batch-based timestamping.

Abstract

TrueTime clocks (TTCs) that offer accurate and reliable time within limited uncertainty bounds have been increasingly implemented in many clouds. Multi-region data stores that seek decentralized synchronization for high performance represent an ideal application of TTC. However, the co-designs between the two were often undervalued or failed to realize their full potential. This paper proposes K2, a multi-region data store that intensely explores the opportunity of using TTC for distributed transactions. Compared to its pioneer, Google Spanner, K2 augments TTC's semantics in three core design pillars. First, K2 carries a new timestamp-generating scheme that is capable of providing a small time uncertainty bound at scale. Second, K2 revitalizes existing multi-version timestamp-ordered concurrency control to realize multi-version properties for read-write transactions. Third, K2 introduces a new TTC-based visibility control protocol that provides efficient reads at replicas. Our evaluation shows that, K2 achieves an order of magnitude higher transaction throughput relative to other practical geo-distributed transaction protocols while ensuring a lower visibility delay at asynchronous replicas.

K2: On Optimizing Distributed Transactions in a Multi-region Data Store with TrueTime Clocks (Extended Version)

TL;DR

K2 tackles the problem of achieving high-throughput, strictly serializable transactions across geo-distributed data stores by deeply co-designing with TrueTime clocks. It introduces three innovations: K2-TB, a timestamp batching mechanism that delivers up to timestamps/s per core with an uncertainty bound around ; K2-MVTO, a TTC-based multi-version timestamp-ordering protocol that uses a single start timestamp to reduce commit-waits and enable early writes; and K2-VCR, an epoch-based visibility control protocol that allows reads at replicas with low latency while guaranteeing atomic visibility. Empirical results show K2-TB enhances timestamping performance by orders of magnitude over strawman approaches, and K2-MVTO delivers up to the throughput of MVTO-HLC and that of d2PL-TTC on TPC-C, with YCSB-T and replica-read benchmarks confirming lower visibility delays and robust performance across workloads. These contributions enable scalable, strongly consistent geo-distributed transactions, with practical deployment guidance such as epoch lengths around and TTC-based architectures optimized for batch-based timestamping.

Abstract

TrueTime clocks (TTCs) that offer accurate and reliable time within limited uncertainty bounds have been increasingly implemented in many clouds. Multi-region data stores that seek decentralized synchronization for high performance represent an ideal application of TTC. However, the co-designs between the two were often undervalued or failed to realize their full potential. This paper proposes K2, a multi-region data store that intensely explores the opportunity of using TTC for distributed transactions. Compared to its pioneer, Google Spanner, K2 augments TTC's semantics in three core design pillars. First, K2 carries a new timestamp-generating scheme that is capable of providing a small time uncertainty bound at scale. Second, K2 revitalizes existing multi-version timestamp-ordered concurrency control to realize multi-version properties for read-write transactions. Third, K2 introduces a new TTC-based visibility control protocol that provides efficient reads at replicas. Our evaluation shows that, K2 achieves an order of magnitude higher transaction throughput relative to other practical geo-distributed transaction protocols while ensuring a lower visibility delay at asynchronous replicas.

Paper Structure

This paper contains 32 sections, 7 equations, 23 figures, 2 tables.

Figures (23)

  • Figure 1: K2's TTC Oracle Architecture.
  • Figure 2: K2's system architecture.
  • Figure 3: A strawman approach for timestamp generation.
  • Figure 4: Latency breakdown of YCSB-T (Strawman approach).
  • Figure 5: K2's timestamp batching workflow.
  • ...and 18 more figures