Interview Prep/Monitoring & Observability/Kubernetes & Multi-Cluster Observability

How do you isolate tenants' metrics in a shared Mimir or Thanos backend?

AdvancedProductionKubernetes & Multi-Cluster Observability
Answer

Mimir and Loki are multi-tenant via the X-Scope-OrgID header. Decide the tenant boundary (team, environment or cluster), then enforce it at write and read time:

  • Write: each cluster's Prometheus or Alloy sends with its tenant header; for per-namespace tenancy, an Alloy or collector tier splits by namespace and sets the header.
  • Read: Grafana data sources per tenant (or a gateway that maps the user's team to an OrgID), with folder permissions per team.
  • Limits: per-tenant ingestion_rate, max_global_series_per_user, max_fetched_series_per_query in the runtime overrides file.

Cross-tenant queries (tenant1|tenant2 with tenant_federation enabled) are reserved for the platform team.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Kubernetes & Multi-Cluster Observability