Migration-Free Elastic Storage of Time Series in Apache IoTDB

Rongzhao Chen, Xiangpeng Hu, Xiangdong Huang, Chen Wang, Shaoxu Song, Jianmin WangPVLDB 2025

TL;DR

This paper introduces migration-free strategies for data partitioning, replica placement, and leader selection in Apache IoTDB, a time-series database for IoT. By leveraging Time-to-Live (TTL) and dynamic shard expansion, they achieve elastic storage and improved performance without costly data migration, making IoT data management more efficient and scalable.

What Problem Does This Paper Address?

The Internet of Things (IoT) generates massive amounts of time-series data, leading to rapidly growing clusters in databases like Apache IoTDB. Traditional approaches to managing this growth involve migrating existing data partitions when clusters expand or rebalance, which incurs significant overhead and downtime. This paper tackles the challenge of achieving elastic storage and maintaining performance in distributed time-series databases under dynamic IoT workloads, specifically addressing:

  • Migration Overhead: The cost and complexity of moving data when clusters scale or rebalance.
  • Storage Balance: Ensuring data is evenly distributed across nodes to prevent bottlenecks.
  • Fault Tolerance: Maintaining data availability and system stability in the face of node failures.
  • Write Load Balance: Distributing write requests efficiently to avoid hotspots and maximize throughput.

Methods

The paper proposes three core strategies:

  • Migration-Free Data Partitioning and Allocation: Instead of migrating data, they leverage Time-to-Live (TTL) to automatically unload expired data. When the cluster expands, new shards are dynamically added, and data partitions are reallocated to these new shards. This avoids the need to move existing, unexpired data.
  • Storage-Balanced and Fault-Tolerant Replica Placement (PGP Algorithm): They formalize the replica placement problem as NP-complete and propose the Partite Graph Placement (PGP) algorithm. PGP aims to maximize the "scatter width" (a measure of fault tolerance) while ensuring storage balance by considering node load and replication factor. It uses a heuristic approach based on graph partitioning and a valuation function.
  • Write-Balanced Leader Selection (CFS Algorithm): To address the intensive write load in IoT, they propose the Cost Flow Selection (CFS) algorithm. This algorithm models leader selection as a minimum-cost maximum-flow problem, ensuring an optimally balanced distribution of leaders across nodes, which directly impacts write throughput.

Datasets

The experiments were conducted using WAL (Write-Ahead Logging) files provided by AUTOAI, which contain sampling records from approximately 20 million sensors. This dataset is noted for preserving the original sequence of data arrival, allowing for a realistic simulation of production workloads.

Key Insights and Ideas

  • TTL as a Game Changer: The paper highlights how TTL, often used for data cleanup, can be ingeniously repurposed to enable migration-free scaling. By allowing old data to expire, the system can rebalance storage by simply adding new capacity without touching active data.
  • Decomposing Complexity: The problem of elastic storage is broken down into three distinct but interconnected challenges: partitioning/allocation, replica placement, and leader selection. Addressing each with specialized, optimized algorithms leads to a holistic solution.
  • Formalizing Trade-offs: The authors rigorously analyze the trade-offs between fault tolerance (scatter width, Copysets) and storage balance, demonstrating that existing methods often compromise one for the other. Their PGP algorithm aims to achieve both.
  • Cost Flow for Optimal Balance: Applying a min-cost max-flow algorithm to leader selection is a clever way to guarantee an optimal, balanced distribution of leaders, directly impacting performance.

Key Results

  • Reduced Expansion Time: The migration-free approach significantly reduces cluster expansion time, being up to 200x faster than migration-based methods.
  • Improved Write Efficiency: The proposed methods achieve 21.6% lower write latency and 27.5% higher write throughput compared to migration-based approaches.
  • Superior Storage Balance: In expansion scenarios, the migration-free approach shows a 248.4% lower disk usage standard deviation (std) compared to state-of-the-art fault-tolerant algorithms. In disaster scenarios, it's 70.0% lower.
  • Enhanced Write Load Balance: The CFS leader selection algorithm results in a 322.9% lower write throughput std in expansion and 60.3% lower in disaster scenarios compared to alternatives.
  • Energy Efficiency: The PGP algorithm is up to 7.4% more energy-efficient than other placement algorithms.
  • Fault Tolerance: The PGP algorithm provides strong single-node fault tolerance and demonstrates good multi-node fault tolerance, with tolerance improving as the replication factor increases.

Limitations and Future Work

  • TTL Dependency: The migration-free strategy relies on TTL to eventually rebalance storage. If TTL is not configured appropriately or data has a very long lifespan, the system might take longer to achieve full balance.
  • Dynamic Data Inflow/Outflow: The paper notes that unusual data inflow/outflow patterns (e.g., with long TTL settings) can lead to temporary imbalance after expansion, requiring more time to rebalance.
  • Geo-distributed Clusters: While the paper mentions NEMO's approach to geo-distributed clusters, the current Apache IoTDB implementation doesn't yet optimize for communication latency between geo-distributed nodes. This is suggested as a future refinement.
  • Probabilistic Multi-Node Fault Tolerance: The paper acknowledges that a probabilistic model for multi-node fault tolerance is presented, but empirical validation for complex disaster scenarios might be an area for further exploration.

Summary updated

BibTeX
@article{chen2025migration,
  author = {Rongzhao Chen and Xiangpeng Hu and Xiangdong Huang and Chen Wang and Shaoxu Song and Jianmin Wang},
  title = {{Migration-Free Elastic Storage of Time Series in Apache IoTDB}},
  journal = {PVLDB},
  year = {2025},
  doi = {10.14778/3725688.3725706},
}
Figure