Interview Prep/Monitoring & Observability/Kubernetes Monitoring, Scale & Cloud

What is downsampling, and what does it not do?

AdvancedConceptKubernetes Monitoring, Scale & Cloud
Answer

Downsampling (Thanos compactor) creates lower-resolution copies of blocks: 5-minute resolution for blocks older than 40 hours and 1-hour resolution for blocks older than 10 days. Each downsampled point stores aggregates (count, sum, min, max, counter) so rate() and _over_time still work.

thanos compact --retention.resolution-raw=30d \
  --retention.resolution-5m=180d --retention.resolution-1h=2y --wait

What it does not do:

  • It does not save space by itself: it adds blocks. Savings only come from shorter retention on raw data.
  • It does not reduce series count or cardinality.
  • It loses detail: a 1-minute spike disappears in 1h data, and [5m] windows on 1h data return nothing.

It speeds up long-range queries, which is its real purpose.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Kubernetes Monitoring, Scale & Cloud