Your log volume is 5 TB/day. Should you put Kafka between shippers and the log backend?
AdvancedScenarioLogging Pipelines
Answer
Situation read → At this scale, backend maintenance, upgrades and spikes cause data loss without a buffer.
What I'd do →
- Shippers (Vector/Fluent Bit) write to Kafka topics partitioned by service or tenant.
- Consumers (Vector, Logstash, OTel Collector with Kafka receiver) read, enrich and write to Loki/ES/S3.
- Size retention on Kafka for at least 24–72 hours of replay.
- Monitor consumer lag as the key health metric for the pipeline.
- Use the same stream to fan out to SIEM and archive without double-shipping.
Why → Kafka decouples producers from consumers, absorbs spikes, and allows replay after an outage.
Interview tip → Mention the trade-off: one more stateful system to operate and secure. Below ~100 GB/day, disk buffering is usually enough.
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