Table of Contents
Fetching ...

Approximation-First Timeseries Monitoring Query At Scale

Zeying Zhu, Jonathan Chamberlain, Kenny Wu, David Starobinski, Zaoxing Liu

TL;DR

PromSketch addresses the high operational costs and latency of rule queries in time-series monitoring by introducing an approximation-first intermediate cache that stores sub-window results using Exponential Histogram and sketches. It combines EH with KLL for quantiles (EHKLL) and EH with universal sketches (EHUniv) to support a broad set of statistics within a single cache, and extends to single-machine and distributed deployments. The approach yields up to two orders of magnitude reductions in latency and up to two orders of magnitude in operational cost, with mean errors around $5\%$ across statistics, while preserving compatibility with Prometheus and VictoriaMetrics. The work provides theoretical space–accuracy guarantees and demonstrates practical feasibility through real-world and synthetic evaluations, showing significant improvements for cloud-native monitoring workloads.

Abstract

Timeseries monitoring systems such as Prometheus play a crucial role in gaining observability of the underlying system components. These systems collect timeseries metrics from various system components and perform monitoring queries over periodic window-based aggregations (i.e., rule queries). However, despite wide adoption, the operational costs and query latency of rule queries remain high. In this paper, we identify major bottlenecks associated with repeated data scans and query computations concerning window overlaps in rule queries, and present PromSketch, an approximation-first query framework as intermediate caches for monitoring systems. It enables low operational costs and query latency, by combining approximate window-based query frameworks and sketch-based precomputation. PromSketch is implemented as a standalone module that can be integrated into Prometheus and VictoriaMetrics, covering 70% of Prometheus' aggregation over time queries. Our evaluation shows that PromSketch achieves up to a two orders of magnitude reduction in query latency over Prometheus and VictoriaMetrics, while lowering operational dollar costs of query processing by two orders of magnitude compared to Prometheus and by at least 4x compared to VictoriaMetrics with at most 5% average errors across statistics. The source code has been made available at https://github.com/Froot-NetSys/promsketch.

Approximation-First Timeseries Monitoring Query At Scale

TL;DR

PromSketch addresses the high operational costs and latency of rule queries in time-series monitoring by introducing an approximation-first intermediate cache that stores sub-window results using Exponential Histogram and sketches. It combines EH with KLL for quantiles (EHKLL) and EH with universal sketches (EHUniv) to support a broad set of statistics within a single cache, and extends to single-machine and distributed deployments. The approach yields up to two orders of magnitude reductions in latency and up to two orders of magnitude in operational cost, with mean errors around across statistics, while preserving compatibility with Prometheus and VictoriaMetrics. The work provides theoretical space–accuracy guarantees and demonstrates practical feasibility through real-world and synthetic evaluations, showing significant improvements for cloud-native monitoring workloads.

Abstract

Timeseries monitoring systems such as Prometheus play a crucial role in gaining observability of the underlying system components. These systems collect timeseries metrics from various system components and perform monitoring queries over periodic window-based aggregations (i.e., rule queries). However, despite wide adoption, the operational costs and query latency of rule queries remain high. In this paper, we identify major bottlenecks associated with repeated data scans and query computations concerning window overlaps in rule queries, and present PromSketch, an approximation-first query framework as intermediate caches for monitoring systems. It enables low operational costs and query latency, by combining approximate window-based query frameworks and sketch-based precomputation. PromSketch is implemented as a standalone module that can be integrated into Prometheus and VictoriaMetrics, covering 70% of Prometheus' aggregation over time queries. Our evaluation shows that PromSketch achieves up to a two orders of magnitude reduction in query latency over Prometheus and VictoriaMetrics, while lowering operational dollar costs of query processing by two orders of magnitude compared to Prometheus and by at least 4x compared to VictoriaMetrics with at most 5% average errors across statistics. The source code has been made available at https://github.com/Froot-NetSys/promsketch.
Paper Structure (27 sections, 1 equation, 13 figures, 6 tables, 2 algorithms)

This paper contains 27 sections, 1 equation, 13 figures, 6 tables, 2 algorithms.

Figures (13)

  • Figure 1: A Prometheus monitoring ecosystem with PromSketch.
  • Figure 2: The architecture of a timeseries monitoring system.
  • Figure 3: Timeseries data and different types of queries in Prometheus. Each row is a timeseries identified by its labels.
  • Figure 4: PromSketch Architecture.
  • Figure 5: Exponential Histogram (EH) datar2002maintaining and Smooth Histogram (SH) braverman2007smooth structures and window-based queries. $(t_1, t)$ and $(t_2, t_3)$ are sub-window queries within the most recent $T$ time window and current time $t$.
  • ...and 8 more figures