Netflix's Druid Cache: Smarter Queries, Faster Insights
Alps Wang
Apr 7, 2026 · 1 views
The Interval-Aware Caching Breakthrough
Netflix's interval-aware caching for Druid is a compelling solution to a very real and common problem in large-scale time-series analytics: the inefficiency of repeatedly querying slightly overlapping time windows. The core insight – that older data is stable and doesn't need re-fetching – is elegantly implemented through an external caching layer. The use of exponentially increasing TTLs based on data age is particularly noteworthy, as it directly addresses the inherent uncertainty of late-arriving data in real-time systems. This approach effectively shifts the burden from the computationally expensive Druid cluster to a more cost-effective caching layer, leading to significant performance gains and hardware cost savings. The transparency of the proxy layer, allowing for easy adoption without client changes, is a crucial factor for its success within Netflix.
However, the reliance on an external proxy introduces an additional point of failure and network hop, which, while acknowledged by Netflix as a temporary measure, adds complexity to the infrastructure. The 5-second staleness, while acceptable for their use cases, might be a limiting factor for applications demanding absolute real-time accuracy. Furthermore, the effectiveness of this caching strategy is highly dependent on the query workload's repetitiveness and overlap. Workloads with highly unique or frequently changing query patterns would see diminishing returns. The 'negative caching' for sparse metrics is a clever addition to prevent redundant queries, but its implementation details regarding the trailing empty buckets are critical to avoid exacerbating late-arriving data issues. The ultimate goal of integrating this into Druid itself is the most promising long-term solution, promising greater efficiency and wider community benefit.
Key Points
- The problem: High-volume, repetitive queries on rolling-window dashboards in Apache Druid at Netflix scale lead to significant load and expensive hardware scaling.
- The insight: Most data in rolling windows is historical and stable; only the freshest portion needs re-querying.
- The solution: An external interval-aware caching layer intercepts queries, serves cached historical data, and fetches only the new data from Druid.
- Key innovations:
- Exponentially increasing TTLs based on data age to account for late-arriving data.
- Bucketing query results into granularity-aligned time buckets for efficient range scans.
- Using a map-of-maps structure with query hash as the top-level key.
- Negative caching for sparse metrics to avoid re-querying empty buckets.
- Trade-offs: Accepts up to 5 seconds of staleness for fresher data, which is acceptable for operational dashboards.
- Benefits: Significantly reduced query load on Druid, faster dashboard loading times, and substantial cost savings.
- Future work: Integration into Druid itself for better efficiency and broader community adoption.

📖 Source: Stop Answering the Same Question Twice: Interval-Aware Caching for Druid at Netflix Scale
Related Articles
Comments (0)
No comments yet. Be the first to comment!
