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 →
- 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).
- 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.
- Consider the team: Grafana-native stack favours Loki; existing Kibana skills favour ES.
- 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."
More on Logging Pipelines
Developers SSH into servers and `grep` log files to debug. You are asked to centralise logging. Where do you start?BeginnerYour app writes free-text logs like `User 42 paid 19.99 in 340ms`. Why push for structured logging, and how?BeginnerLoki ingestion is failing with `stream limit exceeded` and the ingester memory is exploding. What happened?IntermediateFluent Bit pods on busy nodes are dropping logs during traffic spikes. How do you make the pipeline lossless?IntermediateThe Elasticsearch cluster for logs goes red every Monday after the weekend batch jobs. How do you stabilise it?AdvancedFinance says the log bill doubled in a quarter. How do you cut it without losing debugging ability?Intermediate