Video in progress

A single Prometheus server is struggling at 15 million active series, and teams are asking for a year of history. How do you scale the metrics platform?

A single Prometheus scales vertically and is not designed for long retention. The answer is a system that scales horizontally and writes to object storage: Thanos, Grafana Mimir or VictoriaMetrics. In parallel you need to reduce cardinality and downsample old data.

📖 Answer

First I work out the cause: is the problem the volume, or the junk? Often a large part of the 15 million series is metrics nobody queries, or exploded labels. So the first step is an audit: the metrics that produce the most series, and the ones used in no dashboard or alert. On one project this alone cut the series count nearly in half.

Then the architecture options:

Option How it works When it fits
Federation a central Prometheus pulls aggregates from the others only when you need a summary view; not for full data
Thanos (sidecar) a sidecar next to each Prometheus uploads blocks to S3, the Querier merges everything keeping your existing Prometheus servers and adding a global view and long history on top
Mimir / Cortex (remote write) Prometheus or agents remote write, a central cluster stores and queries a multi-tenant central platform, strong horizontal scale
VictoriaMetrics simpler to operate, fewer resources saving resources matters, the team is small

For a multi-tenant organization I usually lean toward remote write + Mimir: each team gets its own tenant, with series and ingestion limits per tenant. This closes off the "one team's mistake took everyone down" case.

Downsampling for long history: you don't need a year of data at 15-second resolution. 5-minute and 1-hour aggregates are enough (the Thanos compactor does this), and raw data is kept for 2-4 weeks.

Something to keep in mind: global queries over large time ranges are heavy. Without pre-aggregated series from recording rules and query limits, a single Grafana panel can take down the whole query layer.