Interview Prep/Monitoring & Observability/Long-Term Storage, Scale and Cost

Compliance says payment metrics must be kept 2 years, but everything else only 90 days. How do you set it up?

BeginnerScenarioLong-Term Storage, Scale and Cost
Answer

Situation read → You need different retention for different data.

What I'd do →

  1. Put payment services in their own tenant (Mimir) and set retention per tenant:
    overrides:
      payments:
        compactor_blocks_retention_period: 2y
    
  2. Or send only the required metrics to a separate bucket using a second remote_write with write_relabel_configs.
  3. Document which metrics are covered and why.
  4. Test that old data is actually deleted for other tenants.

Why → Per-tenant retention avoids storing everything for 2 years.

Interview tip → Ask compliance which metrics are really needed; it is usually a small set.

All Monitoring & Observability questions

More on Long-Term Storage, Scale and Cost