Finance says the log bill doubled in a quarter. How do you cut it without losing debugging ability?
IntermediateScenarioLogging Pipelines
Answer
Situation read → Volume grew, retention is uniform, and nobody owns cost per service.
What I'd do →
- Measure bytes per
serviceandlevelfor a week; usually a few services emit most of the volume. - Drop DEBUG in production by default; sample repeated INFO lines (e.g. health checks, access logs for 200s).
- Filter at the shipper (
grep/dropprocessors in Fluent Bit, Vectorfilter, Alloystage.drop). - Tier retention: 7 days hot for most, 30 days for audit-relevant, then archive to S3 Glacier.
- Publish a per-team log cost dashboard to create ownership.
Why → Most log spend is low-value noise; cutting at the source is cheapest.
Interview tip → Never drop errors or audit logs to save money; say so explicitly.
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?AdvancedA Java stack trace shows up in Kibana as 40 separate log events. How do you fix it?Beginner