fluent-bit
fluent-bit copied to clipboard
Unclear relationship between storage.type=filesystem and storage.pause_on_chunks_overlimit=on
Regarding filesystem-based buffering, the documentation is not clear in regards of what happens when following is set: storage.type=filesystem and storage.pause_on_chunks_overlimit=on
Doc says: "If the input plugin has enabled storage.type as filesystem, when reaching the storage.max_chunks_up threshold, instead of the plugin being paused, all new data will go to chunks that are down in the filesystem. This lets you control memory usage by the service and also provides a guarantee that the service won't lose any data. " ==> my reading: this setting is sufficient to prevent FluentBit from pausing and writing to files when buffers full
However, doc also says: "If storage.pause_on_chunks_overlimit is enabled (default is off), the input plugin pauses upon exceeding storage.max_chunks_up. With this option,storage.max_chunks_up becomes a hard limit for the input. When the input is paused, records won't be ingested until the plugin resumes. For some inputs, such as TCP and tail, pausing the input will almost certainly lead to log loss."
==> so this setting and statement is kind of in contradiction with the first statement.
As far as I observed the behavior of fluentbit, with storage.pause_on_chunks_overlimit=on the agents stop processing rather soon on any outage of the log backend and log is lossed when CRI-O input file is rotated.
Also for storage.sync=full it says: "Using full increases the reliability of the filesystem buffer and ensures that data is guaranteed to be synced to the filesystem even if Fluent Bit crashes."
I was expecting that once I set storage.sync to full that then each memory chunk is also stored to file immediately. However, as long as the log backend is available, there is nearly no .fbl file I can see in the filestorage (only temporary ones in rare cases). As soon as the log backend is unavailable, I can see files being written. It seems that under "normal situations" FluentBit does not need to buffer the logs and, thus, does not write any cache files. Is that correct and how is data loss then prevented?
Could someone please comment and maybe improve documentation to make that clear.