Interview Prep/Monitoring & Observability/Long-Term Storage, Scale and Cost

Histograms are 60% of all series in your Prometheus. How do you reduce them?

IntermediateScenarioLong-Term Storage, Scale and Cost
Answer

Situation read → Each classic histogram creates one series per bucket per label set; 20 buckets × many labels adds up fast.

What I'd do →

  1. Find the largest: topk(10, count by (__name__) ({__name__=~".+_bucket"})).
  2. Reduce buckets to those around the SLO thresholds (8–12 buckets).
  3. Remove high-cardinality labels from histograms (e.g. full path, pod).
  4. Drop unused histograms at scrape with metric_relabel_configs.
  5. Evaluate native histograms, which store all buckets in one series.

Why → Histogram cost = buckets × label combinations.

Interview tip → Keep the _count and _sum series even if you drop the buckets; they still give rate and average.

All Monitoring & Observability questions

More on Long-Term Storage, Scale and Cost