How do you plan object-storage retention and downsampling for long-term metrics?
IntermediateProductionScaling Prometheus, Long-Term Storage & HA
Answer
Typical policy: raw data 30 days, 5-minute resolution 6–12 months, 1-hour resolution 2+ years. With Thanos compactor:
thanos compact --retention.resolution-raw=30d \
--retention.resolution-5m=180d --retention.resolution-1h=2y --wait
Downsampling helps query speed for long ranges, not necessarily storage (Thanos keeps all resolutions). Mimir has no downsampling; it relies on query sharding and caching instead. Run exactly one compactor per bucket.
More on Scaling Prometheus, Long-Term Storage & HA
What are the practical limits of a single Prometheus server?IntermediateWhen does hierarchical federation still make sense?IntermediateHow do you shard Prometheus scraping, and what do you lose?AdvancedCompare Thanos, Grafana Mimir and VictoriaMetrics.AdvancedThanos sidecar versus Thanos Receive: how do you choose?AdvancedWhat is Prometheus agent mode and when do you use it?Intermediate