The logging agent is consuming 1.5 CPU cores per node. How do you reduce it?
IntermediateScenarioLogging Pipelines
Answer
Situation read → Heavy parsing, regex, or excessive volume on the node.
What I'd do →
- Profile which pipeline stages use CPU (agent metrics, or pprof for Alloy/Vector).
- Replace regex parsing with JSON parsing or move parsing to a central aggregation tier.
- Drop noisy logs as early as possible (before enrichment and parsing).
- Batch and compress output (gzip/snappy).
- Set CPU limits carefully: throttling causes lag and growing buffers.
Why → Agents run on every node, so wasted CPU is multiplied by fleet size.
Interview tip → Present the cost: 1.5 cores x 300 nodes is 450 cores spent on log shipping.
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