Should you choose Loki or Elasticsearch for a new logging platform?

AdvancedScenarioLogging Pipelines
Answer

Situation read → It depends on query patterns, scale and budget.

What I'd do →

  1. List use cases: debugging by service and time (Loki fits), full-text search across all fields and analytics (Elasticsearch/OpenSearch fits), security/SIEM (ES or a dedicated SIEM).
  2. Compare cost: Loki indexes labels only and stores chunks in S3, so storage is cheap; ES indexes everything, so it is faster for arbitrary search but needs much more disk and memory.
  3. Consider the team: Grafana-native stack favours Loki; existing Kibana skills favour ES.
  4. Run a two-week proof of concept on real traffic, measuring cost per GB and query latency.

Why → There is no universal winner; it is a cost versus query flexibility trade-off.

Interview tip → State the core trade-off in one line: "Loki is cheap to write, ES is cheap to search."

All Monitoring & Observability questions Roadmap: Logging & tracing

More on Logging Pipelines