Adaptive TTL-Based Caching for Content Delivery

Soumya Basu, Aditya Sundarrajan, Javad Ghaderi, Sanjay Shakkottai, Ramesh K. Sitaraman

Abstract

Modern Content Delivery Networks (CDNs) face significant challenges due to the non-stationary and bursty nature of internet traffic. Traditional caching algorithms often fail to provide performance guarantees under these conditions. This paper introduces d-TTL and f-TTL, two adaptive caching algorithms that leverage Time-to-Live (TTL) parameters and stochastic approximation to meet specific performance targets. By employing a two-level filtering structure, f-TTL effectively manages "one-hit wonders," achieving target hit rates with significantly reduced cache sizes compared to standard approaches.

Introduction

Caching is fundamental to internet infrastructure, yet designing robust algorithms remains a complex task. Most theoretical models rely on the Independent Reference Model (IRM), which assumes stationary and independent requests. However, real-world CDN traffic is characterized by non-stationarity, extreme burstiness (flash crowds), and a high prevalence of "one-hit wonders"—objects requested only once that can pollute the cache.

Existing solutions like Least Recently Used (LRU) or fixed TTL policies often lack performance guarantees. The need for self-tuning algorithms that can reliably achieve a target hit rate without excessive storage overhead is critical for global CDN operations. Furthermore, popular mathematical tools like Che’s approximation have been shown to be inaccurate on production traffic, often overestimating hit rates by failing to account for these non-stationary patterns.

Methods

The proposed framework centers on two TTL-based algorithms where a timer determines an object's residency in the cache.

d-TTL (Dynamic TTL)

d-TTL is a single-level algorithm that maintains a TTL value for each content type. It utilizes stochastic approximation to dynamically adjust the TTL: increasing it upon a cache miss and decreasing it upon a hit. This allows the algorithm to "hunt" for the optimal TTL that satisfies a pre-defined target hit rate.

f-TTL (Filtering TTL)

f-TTL is a more advanced two-level algorithm designed specifically to mitigate the impact of "one-hit wonders." It partitions the cache into a shadow cache (storing metadata) and a deep cache for frequently accessed content.

Algorithmic logic for the f-TTL filtering mechanism, showing the transition of objects from the shadow cache to the main cache.

The f-TTL mechanism operates on a two-time-scale actor-critic approach. The "actor" adjusts the TTL to meet hit-rate targets, while the "critic" monitors cache size and adjusts filtering aggressiveness. As shown in the logic above, an object $c(l)$ is only moved to the main cache $\mathcal{C}$ if it is already present in the shadow cache $\mathcal{C}_s$, effectively filtering out objects with single requests.

Evaluation and Results

The algorithms were rigorously tested using a 9-day production trace from Akamai, encompassing over 504 million requests and 165 TB of data. The trace confirmed that 70% of objects were requested only once.

Key findings include:

  • Target Accuracy: Both d-TTL and f-TTL achieved target hit rates with a very low error margin (approximately 1.2% to 1.3%).
  • Storage Efficiency: f-TTL demonstrated superior efficiency, requiring a cache 49% smaller than d-TTL to achieve the same object hit rate and 39% smaller for byte hit rates.
  • Convergence and Robustness: Mathematical proofs confirm that these algorithms almost surely converge to desired targets even under bursty, Markovian arrival models. They also remain stable across varying "step sizes" for TTL adjustments.

Conclusion

Adaptive TTL-based caching provides a provable method for meeting performance targets in non-stationary environments. By using a shadow cache to filter out rare objects, f-TTL drastically reduces physical storage requirements without sacrificing hit rates. While the current work focuses on hitting specific targets rather than global optimization, it paves the way for new CDN service models based on guaranteed hit rates. Future research will explore the optimal definition of content types and the economic implications of such performance guarantees.

Summary updated

BibTeX
@article{basu2018adaptive,
  author = {Soumya Basu and Aditya Sundarrajan and Javad Ghaderi and Sanjay Shakkottai and Ramesh K. Sitaraman},
  title = {{Adaptive TTL-Based Caching for Content Delivery}},
  journal = {IEEE/ACM Trans. Networking},
  year = {2018},
  url = {https://openreview.net/forum?id=e-S1RhWOiV},
}
Figure