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 QueryMimir 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
helm install mimir grafana/mimir-distributed \
--namespace monitoring --create-namespace \
--set minio.enabled=true # Built-in MinIO for testingFor production, point to your S3 bucket:
# values.yaml
mimir:
structuredConfig:
common:
storage:
backend: s3
s3:
endpoint: s3.eu-west-1.amazonaws.com
bucket_name: mimir-metrics
region: eu-west-1Configure Prometheus
# prometheus.yml
remote_write:
- url: http://mimir-distributor.monitoring:8080/api/v1/push
headers:
X-Scope-OrgID: myorgThat is it. Prometheus pushes all metrics to Mimir. Local retention can be reduced to hours.
Master this topic with hands-on labs
Go beyond reading — build real projects in sandboxed environments with expert video guidance.
Browse Courses →Multi-Tenancy
# 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-bEach tenant's data is isolated. Team A cannot query team B's metrics. One Mimir cluster, many teams.
Grafana Configuration
datasources:
- name: Mimir
type: prometheus
url: http://mimir-querier.monitoring:8080/prometheus
jsonData:
httpHeaderName1: X-Scope-OrgID
secureJsonData:
httpHeaderValue1: myorgGrafana queries Mimir using standard PromQL. All existing dashboards work without changes.
Limits and Quotas
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 retentionSet limits per tenant to prevent noisy neighbors from affecting others.
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:
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: criticalRules run inside Mimir — no separate Prometheus ruler needed.
Compaction and Downsampling
The compactor runs automatically:
Raw metrics (15s resolution) → 2h blocks → 24h compacted blocksBlocks 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:
| Metric | Mimir Capacity |
|---|---|
| Active series | Billions |
| Ingestion rate | Millions of samples/sec |
| Query range | Years |
| Tenants | Unlimited |
| Storage | Object storage (unlimited) |
Mimir vs Alternatives
| Feature | Mimir | Thanos | Cortex | VictoriaMetrics |
|---|---|---|---|---|
| Architecture | Write-ahead | Sidecar | Write-ahead | Standalone/cluster |
| Multi-tenancy | Native | No | Native | Enterprise |
| Scale | Massive | Large | Large | Large |
| Complexity | Medium | Medium | High | Low |
| Storage | S3/GCS | S3/GCS | S3/GCS | Local + S3 |
| Grafana Labs | Yes | Community | Predecessor | No |
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.
Related Articles
Thanos Long-Term Prometheus Storage
Thanos extends Prometheus with unlimited retention, global querying across clusters, and downsampling. Learn how to deploy Thanos Sidecar and Store Gateway.
OpenTelemetry Getting Started Guide
OpenTelemetry is the standard for observability instrumentation. Learn how to add traces, metrics, and logs to your applications with OTel SDKs.
Prometheus Monitoring Beginner Guide
Get started with Prometheus monitoring. Metrics collection, PromQL queries, Grafana dashboards, and alert configuration step by step.
Grafana Tempo Distributed Tracing
Grafana Tempo stores distributed traces at scale with object storage. Learn how Tempo compares to Jaeger, how to deploy it on Kubernetes, and how to correlate.
Harbor Container Registry Guide
Harbor is an open-source container registry with vulnerability scanning, RBAC, image signing, and replication. Learn how to deploy Harbor on Kubernetes.
Headlamp Kubernetes Dashboard Guide
Headlamp is a modern Kubernetes dashboard that replaces the official Kubernetes Dashboard. Learn how to install Headlamp, manage clusters, and extend it.
Explore topics
Browse more articles on the topics covered here.