An Elastic Ephemeral Datastore using Cheap, Transient Cloud Resources

Malte Brodmann, Nikolas Ioannou, Bernard Metzler, Jonas Pfefferle, Ana KlimovicarXiv 2022 · DOI

Introduction

Cloud providers offer "spot instances"—spare capacity sold at a 60-90% discount compared to on-demand pricing. However, these instances come with a significant caveat: the provider can reclaim them at any time, often providing as little as a 30-second termination notice. While suitable for stateless tasks, spot instances are challenging for stateful services like datastores. If a node is reclaimed, any data stored locally is lost.

In modern data analytics frameworks like Apache Spark, "ephemeral data" (such as intermediate shuffle data) is produced at a massive scale. While this data can be recomputed if lost, the recovery process is computationally expensive and introduces significant latency. This research introduces an elastic, distributed datastore built on Apache Crail that leverages these ultra-cheap resources by implementing a proactive data redistribution mechanism during the brief preemption warning period.

System Architecture and Methodology

The core innovation of this system is the Relocator Service, which transforms a standard static data mapping into a dynamic, spot-aware process. The architecture, illustrated in Figure 1, involves several key components working in concert to ensure data durability during node reclamation.

Figure 1: Architecture of the spot-aware datastore showing the Relocator service's interaction with the Namenode and Datanodes.

When a cloud provider issues a termination notice, the system follows a four-step evacuation protocol:

  1. Preemption Monitoring: The Relocator service detects the termination notice.
  2. Rapid Migration: The Relocator reads datablocks from the "doomed" node and writes them to healthy nodes within the cluster.
  3. Metadata Updates: The Relocator notifies the Namenode to update the location of the migrated blocks.
  4. Client Transparency: The client library is modified to handle invalid local caches. If a client attempts to read from a node that has moved, it queries the Namenode for the new location and retries the operation.

To maintain data integrity, the system implements coherence control by rejecting new writes to any node currently undergoing evacuation, forcing clients to utilize stable nodes instead.

Key Insights: The "Escape" Window

The feasibility of this approach depends entirely on the ability to evacuate data within the provider's warning window (typically 30 seconds). The research highlights a critical relationship between memory capacity and network bandwidth.

Figure 6: Data evacuation time across different instance configurations. The red line indicates the 30-second preemption warning threshold.

As shown in Figure 6, smaller VM instances are inherently "safer" because they have a lower ratio of data to available network speed. For instance, configurations up to 64GB with 32Gbit/s bandwidth comfortably fit within the 30-second window. However, larger "monster" instances (e.g., 256GB) fail to evacuate in time because network egress speeds do not scale linearly with memory capacity. Consequently, the authors recommend using a larger number of smaller instances to mitigate the risk of data loss.

Performance and Cost Results

The evaluation, conducted using industry-standard TPC-DS benchmarks and micro-benchmarks on Google Kubernetes Engine (GKE), yielded the following results:

  • Cost Efficiency: Utilizing spot instances reduced storage costs by 60% compared to standard on-demand deployments.
  • Minimal Overhead: For standard TPC-DS workloads, the end-to-end execution time increased by only 2.1% to 3.0%, even under frequent node preemptions.
  • Workload Sensitivity: The system is highly effective for write-heavy, short-lived data common in big data shuffles. However, long-lived read-heavy workloads can experience performance degradation (up to 46% in specific micro-benchmarks) due to data "clumping" on stable nodes, as the current implementation lacks a post-preemption rebalancing mechanism.

Conclusion and Future Work

This research demonstrates that spot instances can be reliably used for stateful ephemeral data storage with minimal performance impact. By trading off traditional triple-replication for high-speed reactive migration, the system achieves massive cost savings. Future improvements will focus on decentralizing the Namenode to allow it to run on spot instances and implementing a background rebalancing service to maintain optimal data distribution after nodes are added or removed.

Summary updated

BibTeX
@misc{brodmann2022elastic,
  author = {Malte Brodmann and Nikolas Ioannou and Bernard Metzler and Jonas Pfefferle and Ana Klimovic},
  title = {{An Elastic Ephemeral Datastore using Cheap, Transient Cloud Resources}},
  year = {2022},
  eprint = {2205.11261},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.11261},
}
Figure