Fluent Bit pods on busy nodes are dropping logs during traffic spikes. How do you make the pipeline lossless?
IntermediateScenarioLogging Pipelines
Answer
Situation read → The in-memory buffer fills when the output is slower than input, and Fluent Bit pauses or drops the input.
What I'd do →
- Enable filesystem buffering:
storage.path /var/fluent-bit/state,storage.type filesystemon inputs, andstorage.total_limit_sizeon outputs. - Set
Mem_Buf_Limiton tail inputs and keep a DB file (DB /var/fluent-bit/state/tail.db) so offsets survive restarts. - Increase output
Workersand setRetry_Limitsensibly (orno_limitsfor critical streams). - Give the DaemonSet enough CPU; check
fluentbit_output_retries_failed_totalandfluentbit_input_bytes_total. - If the backend is the bottleneck, put Kafka between collectors and the backend.
Why → Disk buffering absorbs bursts and backend outages without data loss.
Interview tip → Distinguish "back-pressure" (slow down input) from "drop" (lose data) and say which you chose.
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?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?IntermediateA Java stack trace shows up in Kibana as 40 separate log events. How do you fix it?Beginner