Mimir
By Grafana Labs
Mimir is an open-source, horizontally scalable time-series database built by Grafana Labs to store and query metrics at very large scale using the Prometheus data model and query language, PromQL. It lets organizations run a single,…
Definition
Mimir is an open-source, horizontally scalable time-series database built by Grafana Labs to store and query metrics at very large scale using the Prometheus data model and query language, PromQL. It lets organizations run a single, long-term metrics backend that ingests data from many Prometheus instances or OpenTelemetry collectors without the storage and retention limits of a single Prometheus server.
Overview
Prometheus is the dominant way teams collect metrics, but a single Prometheus server stores data on local disk and does not scale horizontally, which becomes a problem for organizations running hundreds of clusters or needing years of retention for capacity planning and compliance. Mimir was created to remove that ceiling: it is API-compatible with Prometheus's remote-write protocol and query interface, so existing Prometheus servers can point at Mimir instead of managing their own long-term storage, while still speaking the PromQL that operators already know. Internally, Mimir separates ingestion, storage, and querying into independently scalable microservices. Distributors receive incoming samples and shard them across ingesters, which buffer recent data in memory before flushing immutable blocks to object storage such as S3 or GCS. A separate compactor merges and deduplicates these blocks over time, and queriers and store-gateways read from both recent in-memory data and historical blocks to answer PromQL queries, splitting large queries across many workers for speed. This architecture, inherited from and evolved out of the earlier Cortex project, is what lets Mimir handle ingestion rates and cardinality far beyond what a single Prometheus instance can manage. Mimir's closest relative is Cortex, from which it was forked, and Thanos, another project that adds long-term storage and global querying on top of Prometheus using a different architectural approach centered on sidecars and a query gateway. Compared to Thanos, Mimir is typically presented as simpler to operate as a single binary in smaller deployments while still scaling out to microservices for large ones. It differs from all-in-one commercial metrics platforms like Datadog by being metrics-only and self-hosted by default, leaving dashboards, alerting UI, and tracing to companion tools like Grafana and Tempo. In practice, Mimir is deployed as the central metrics store in the Grafana observability stack: Prometheus servers or Grafana Alloy agents remote-write into Mimir, Grafana queries it via PromQL for dashboards, and Grafana-managed alerting rules evaluate against it. Multi-tenant deployments let a platform team run one Mimir cluster serving metrics for many internal teams or customers with isolated data and configurable limits per tenant, which is common in SaaS companies offering observability to end users. The trade-off is operational complexity: running Mimir's full microservices architecture requires understanding several distinct components and their scaling knobs, which is more involved than running a single Prometheus binary. High-cardinality metrics can still strain any backend, including Mimir, so label design discipline still matters. Teams with modest scale and no multi-cluster retention needs may find plain Prometheus, or a lighter long-term-storage add-on, sufficient, reserving Mimir for organizations that have outgrown single-node Prometheus or need centralized, multi-tenant metrics at scale.
Key Features
- Provides horizontally scalable, long-term storage for Prometheus metrics
- Is fully compatible with PromQL and the Prometheus remote-write protocol
- Stores metric blocks in object storage like S3, GCS, or Azure Blob
- Supports multi-tenancy with per-tenant limits and data isolation
- Splits ingestion, storage, and querying into independently scalable services
- Handles high cardinality and high ingest volume better than single-node Prometheus
- Integrates natively with Grafana dashboards and alerting
- Evolved from and remains architecturally related to the Cortex project