Interview Prep/Monitoring & Observability/Scaling Prometheus, Long-Term Storage & HA

How do you enforce per-tenant limits in Mimir?

AdvancedProductionScaling Prometheus, Long-Term Storage & HA
Answer

Mimir is multi-tenant via the X-Scope-OrgID header. Per-tenant overrides control ingest and query limits:

overrides:
  team-payments:
    ingestion_rate: 200000
    max_global_series_per_user: 3000000
    max_label_names_per_series: 30
    max_fetched_series_per_query: 100000

When a tenant exceeds limits, writes get rejected with 429/400 and cortex_discarded_samples_total{reason="per_user_series_limit"} grows. Alert on that per tenant so the team hears about it before its data silently disappears.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Scaling Prometheus, Long-Term Storage & HA