Lion: Minimizing Distributed Transactions through Adaptive Replica Provision (Extended Version)

Qiushi Zheng, Zhanhao Zhao, Wei Lu, Chang Yao, Yuxing Chen, Anqun Pan, Xiaoyong Du

Abstract

Distributed transaction processing often involves multiple rounds of cross-node communications, leading to significant performance overhead. Existing approaches attempt to convert distributed transactions into single-node transactions through data migration or full replication, but these methods often introduce blocking or create bottlenecks. This paper presents Lion, a novel transaction processing protocol that utilizes partition-based replication to minimize distributed transactions. Lion employs an adaptive replica provision mechanism, enhanced with an LSTM-based workload prediction algorithm, to proactively place replicas of co-accessed partitions on the same node. By remastering existing replicas asynchronously, Lion converts the majority of distributed transactions into efficient single-node operations. Experimental results demonstrate that Lion achieves up to 2.7x higher throughput and 76.4% better scalability compared to state-of-the-art approaches.

Introduction

In modern distributed databases, data is partitioned across multiple nodes to enable horizontal scaling. However, transactions spanning multiple partitions often require distributed commit protocols like Two-Phase Commit (2PC). These protocols involve multiple rounds of network communication, which are significantly slower than local operations.

Existing solutions generally fall into two categories:

  1. Data Migration: Moving the primary copy of data to a single node. This can block transactions during the move and lead to "ping-pong" effects in dynamic workloads.
  2. Full Replication: Copying the entire database to a "super node," which creates massive storage overhead and a single-node performance bottleneck.

Lion addresses these issues by leveraging existing high-availability replicas to minimize distributed transactions without the overhead of full migration or super nodes.

System Architecture and Methods

The core of Lion is its Adaptive Replica Provision mechanism, which proactively manages replicas to ensure that most transactions can be processed locally.

The overall architecture of Lion, showing the Planner, Transaction Router, and adaptive replica management across nodes.

The system consists of several key components that work together to optimize data placement:

Workload Analysis and Clump Generation

Lion models transaction patterns as a "heat graph" where nodes represent partitions and edges represent co-access frequency. Partitions that are frequently accessed together are grouped into "clumps" using a clustering algorithm. This allows the system to identify logical units of data that should be co-located to avoid distributed commits.

Graph construction and clump generation based on transaction access patterns.

LSTM-based Workload Prediction

To handle dynamic workloads, Lion uses a Long Short-Term Memory (LSTM) network to forecast future shifts in data access patterns. If a set of partitions is predicted to become "hot" together, Lion initiates replica placement before the transactions arrive. This proactive approach is a significant departure from reactive migration-based systems.

Cost-Model-Based Placement and Remastering

A mathematical cost model determines the optimal placement of clumps to balance load and minimize "remastering" costs. Remastering involves promoting a secondary replica to a primary one. Since the data is already synchronized via standard replication protocols (e.g., Paxos or Raft), this operation is lightweight and much faster than traditional data migration, as it avoids moving the actual data over the network during the critical path of execution.

Evaluation and Results

Lion was evaluated using YCSB and TPC-C benchmarks against state-of-the-art protocols including Leap, Clay, and Hermes.

  • Throughput: Lion achieved up to 2.7x higher throughput than competitors by successfully converting distributed transactions into local ones. In the TPC-C "NewOrder" benchmark, Lion's ability to localize transactions eliminated the high abort rates and long lock-holding times typical of 2PC.
  • Scalability: The system showed 76.4% better scalability, maintaining performance gains as the cluster size increased, whereas other systems hit bottlenecks due to the overhead of managing distributed state.
  • Latency: Under heavy cross-partition workloads, Lion’s 95th percentile latency was 48% lower than its closest competitor, Hermes.
  • Adaptation Overhead: The performance dip during replica rearrangement was kept within 5%, proving that its background adaptation is truly non-intrusive and does not block transaction execution.

Conclusion

Lion effectively minimizes the performance tax of distributed transactions through proactive, partition-based replication. By combining LSTM-based prediction with lightweight remastering, it provides a scalable and high-performance solution for modern distributed database environments. Future work includes exploring more complex prediction models and hardware-level optimizations like RDMA to further reduce communication overhead.

Summary updated

BibTeX
@inproceedings{zheng2024lion,
  author = {Qiushi Zheng and Zhanhao Zhao and Wei Lu and Chang Yao and Yuxing Chen and Anqun Pan and Xiaoyong Du},
  title = {{Lion: Minimizing Distributed Transactions through Adaptive Replica Provision (Extended Version)}},
  booktitle = {ICDE},
  year = {2024},
  url = {https://openreview.net/forum?id=8NeJT5oiCV},
}
Figure