Skip to main content
🎤 Luca Berton is speaking at Red Hat Summit & KubeCon EU 2026!Learn more →
Back to Blog

Grafana Mimir Scalable Metrics Store

Grafana Mimir stores Prometheus metrics at massive scale using object storage. Learn how Mimir compares to Thanos and Cortex, and how to deploy it.

Luca BertonJanuary 26, 20262 min read

Prometheus was not built for long-term storage or multi-tenancy. Mimir was. It ingests Prometheus metrics via remote write, stores them in S3, and serves queries across years of data from multiple tenants.

Architecture

Prometheus → remote_write → Mimir Distributor → Ingester → Object Storage (S3)
                                                                    ↑
                                     Mimir Querier ← Grafana ← User Query

Mimir is horizontally scalable. Each component scales independently:

  • Distributor: Receives incoming metrics, validates, distributes to ingesters
  • Ingester: Batches samples, writes blocks to object storage
  • Querier: Reads from ingesters (recent) and object storage (historical)
  • Compactor: Merges and deduplicates blocks
  • Store-gateway: Serves historical blocks from object storage

Installation

bash
helm install mimir grafana/mimir-distributed \
  --namespace monitoring --create-namespace \
  --set minio.enabled=true  # Built-in MinIO for testing

For production, point to your S3 bucket:

yaml
# values.yaml
mimir:
  structuredConfig:
    common:
      storage:
        backend: s3
        s3:
          endpoint: s3.eu-west-1.amazonaws.com
          bucket_name: mimir-metrics
          region: eu-west-1

Configure Prometheus

yaml
# prometheus.yml
remote_write:
  - url: http://mimir-distributor.monitoring:8080/api/v1/push
    headers:
      X-Scope-OrgID: myorg

That is it. Prometheus pushes all metrics to Mimir. Local retention can be reduced to hours.

Related Course

Master this topic with hands-on labs

Go beyond reading — build real projects in sandboxed environments with expert video guidance.

Browse Courses →

Multi-Tenancy

yaml
# Team A's Prometheus
remote_write:
  - url: http://mimir:8080/api/v1/push
    headers:
      X-Scope-OrgID: team-a

# Team B's Prometheus
remote_write:
  - url: http://mimir:8080/api/v1/push
    headers:
      X-Scope-OrgID: team-b

Each tenant's data is isolated. Team A cannot query team B's metrics. One Mimir cluster, many teams.

Grafana Configuration

yaml
datasources:
  - name: Mimir
    type: prometheus
    url: http://mimir-querier.monitoring:8080/prometheus
    jsonData:
      httpHeaderName1: X-Scope-OrgID
    secureJsonData:
      httpHeaderValue1: myorg

Grafana queries Mimir using standard PromQL. All existing dashboards work without changes.

Limits and Quotas

yaml
mimir:
  structuredConfig:
    limits:
      # Per-tenant limits
      ingestion_rate: 100000          # Samples per second
      ingestion_burst_size: 200000
      max_series_per_user: 5000000    # Active time series
      max_global_series_per_metric: 100000
      compactor_blocks_retention_period: 365d  # 1 year retention

Set limits per tenant to prevent noisy neighbors from affecting others.

Stay Updated

Get weekly IT automation tips

Docker, Ansible, Terraform, MLOps — curated insights delivered to your inbox. No spam.

Subscribe Free →

Recording Rules and Alerting

Mimir supports Prometheus-compatible rules:

yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: mimir-rules
data:
  rules.yaml: |
    groups:
      - name: slo
        rules:
          - record: http_request_error_rate:5m
            expr: |
              sum(rate(http_requests_total{status=~"5.."}[5m]))
              /
              sum(rate(http_requests_total[5m]))
          - alert: HighErrorRate
            expr: http_request_error_rate:5m > 0.01
            for: 5m
            labels:
              severity: critical

Rules run inside Mimir — no separate Prometheus ruler needed.

Compaction and Downsampling

The compactor runs automatically:

Raw metrics (15s resolution) → 2h blocks → 24h compacted blocks

Blocks are merged, deduplicated, and compacted for efficient queries. Historical queries over weeks or months scan fewer, larger blocks.

Scale

Mimir handles billions of active time series:

MetricMimir Capacity
Active seriesBillions
Ingestion rateMillions of samples/sec
Query rangeYears
TenantsUnlimited
StorageObject storage (unlimited)

Mimir vs Alternatives

FeatureMimirThanosCortexVictoriaMetrics
ArchitectureWrite-aheadSidecarWrite-aheadStandalone/cluster
Multi-tenancyNativeNoNativeEnterprise
ScaleMassiveLargeLargeLarge
ComplexityMediumMediumHighLow
StorageS3/GCSS3/GCSS3/GCSLocal + S3
Grafana LabsYesCommunityPredecessorNo

Use Mimir for multi-tenant, high-scale Prometheus storage with Grafana. Use Thanos for sidecar-based approach with less change to existing Prometheus. Use VictoriaMetrics for simplicity.

---

Ready to go deeper? Build your monitoring infrastructure with hands-on courses at CopyPasteLearn.

Ready to learn by doing?

Stop reading tutorials — start building. Expert video courses with hands-on labs in real sandboxed environments.

Share this article
LB
Luca Berton

Docker Captain, IT automation expert, Red Hat Summit & KubeCon speaker. Building hands-on education for DevOps engineers at CopyPasteLearn.

Related Articles

Explore topics

Browse more articles on the topics covered here.