ConfigsApr 15, 2026·3 min read

Grafana Mimir — Horizontally Scalable Prometheus Storage

Long-term metrics store for Prometheus and OpenTelemetry: multi-tenant, highly available, and queryable at a billion active series.

Introduction

Grafana Mimir forked Cortex in 2022 and took it to a new scale: benchmarks show a single cluster holding over one billion active series with sub-second query latency. It speaks the Prometheus remote-write, PromQL, and OpenTelemetry OTLP protocols so existing dashboards and agents plug in without change.

What Mimir Does

  • Stores Prometheus samples in object storage (S3, GCS, Azure, MinIO) indefinitely.
  • Serves PromQL queries across tenants and time windows with query sharding.
  • Ingests OTLP metrics alongside Prometheus remote-write.
  • Provides a managed ruler for recording and alerting rules per tenant.
  • Runs alertmanagers per tenant with a shared ring for HA.

Architecture Overview

Microservices talk over gRPC and share a memberlist ring: distributor, ingester, querier, query-frontend, store-gateway, compactor, ruler, alertmanager. Ingesters buffer 2 hours of data and flush TSDB blocks to object storage; store-gateways index those blocks for historical queries. A deployment runs as three classes of pods (write, read, backend) for simplicity, or 20+ microservices for maximum tuning.

Self-Hosting & Configuration

  • Monolithic mode: one binary, perfect for labs; scale to microservices when you outgrow it.
  • Object store is mandatory — S3-compatible backends keep the stack cheap.
  • Helm chart grafana/mimir-distributed is the production-recommended install.
  • Authenticate tenants via X-Scope-OrgID; pair with an auth proxy or OIDC gateway.
  • Tune -blocks-storage.tsdb.retention-period and compactor schedule for cost.

Key Features

  • Horizontally scalable: add ingesters or queriers — no sharding config to hand-edit.
  • Query sharding splits PromQL across queriers for near-linear speedups.
  • Tenants are first-class: quota, retention, and ruler scheduling are per team.
  • 100% PromQL compatible — existing dashboards move with zero rewrites.
  • Built-in cardinality explorer and overrides-exporter surface hot metrics.

Comparison with Similar Tools

  • Cortex — the parent project; Mimir has faster queries and simpler ops.
  • Thanos — sidecar-first design; shares the object-store idea but different topology.
  • VictoriaMetrics — single-binary rival, MIT license, smaller footprint.
  • Prometheus + remote storage — fine for one team; lacks multi-tenant and HA rulers.
  • DataDog / Chronosphere — managed SaaS; Mimir is the self-hosted alternative.

FAQ

Q: License? A: AGPL-3.0 — safe to self-host, commercial embedding requires care.

Q: Migration from Cortex? A: Supported path; Mimir reads existing Cortex blocks and configs directly.

Q: Alertmanager? A: Mimir ships a multi-tenant Alertmanager; you can also forward to an external one.

Q: Cost at scale? A: Object storage + compute; Grafana Labs reports ~2x cheaper than Thanos at billion-series scale in their benchmarks.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets