How do you control Loki costs and performance at scale?

AdvancedProductionLog Pipelines
Answer
  • Limit streams per tenant (max_global_streams_per_user) and enforce label hygiene.
  • Per-tenant ingestion rate limits (ingestion_rate_mb, ingestion_burst_size_mb).
  • Retention per stream via the compactor (retention_enabled: true).
  • Query limits: max_query_series, max_query_parallelism, split_queries_by_interval.
  • Bloom filters / structured metadata (Loki 3.x) for needle-in-haystack searches on high-cardinality fields.
  • Caches for results and chunks; TSDB index (schema v13).

Watch loki_discarded_samples_total by reason to see what is being rejected.

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Log Pipelines