Object storage for metrics has grown to 400 TB. How do you reduce the cost?
IntermediateScenarioLong-Term Storage, Scale and Cost
Answer
Situation read → Retention is probably "keep everything forever at raw resolution".
What I'd do →
- Measure size by resolution and tenant (
thanos tools bucket inspect). - Set retention per resolution: raw 30 days, 5m 6 months, 1h 2 years.
- Check that the compactor actually runs and keeps up; a halted compactor means no retention at all.
- Move older objects to a cheaper storage class only if the store gateway can still read them (avoid archive classes like Glacier that need restores).
- Reduce cardinality at the source so fewer series are stored at all.
Why → Raw data is the bulk of storage, and almost nobody queries raw data older than a month.
Interview tip → Never use bucket lifecycle rules to delete blocks behind the compactor's back; it causes missing-block errors.
More on Long-Term Storage, Scale and Cost
Prometheus keeps 15 days of data, but leadership wants 13 months of metrics for capacity planning. What do you build?IntermediateThe Thanos compactor has halted and the bucket keeps growing. What do you do?AdvancedGrafana shows every series twice after you added a second Prometheus replica with Thanos. How do you fix it?IntermediateRemote write to your central store is falling further behind every hour. How do you handle it?AdvancedMimir rejects writes from a team with `err-mimir-max-series-per-user`. What do you do?IntermediateYour observability SaaS bill tripled in a quarter, driven by custom metrics. How do you bring it down?Intermediate