Batching and Buffering - inter dependencies #12724
-
hello team, in this case we have tried to test by exceeding the batch.max_bytes before the batch.timeout_secs. we expected the sink to flush the data to the downstream vector source instance which did not happen. can you please elaborate on these parameters for buffering and batching
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @hemanthofficial3009 !
Buffering happens before batching. For disk buffers, the data will remain in the buffer until it has been processed by the sink and sent to the target.
For disk buffers, it will block by default meaning that it will propagate back-pressure up to any connected components. This behavior can be changed via configuring For batches, when the batch is full it will be flushed downstream.
That's correct, it is bytes. We should probably add
When the batch is either full (exceeds You might be seeing some odd behavior by setting the disk buffer max size to the same as the max batch size as the max batch size is actually based on the in-memory size of the events (ref: #10020) whereas the disk buffer max size is based on the number of serialized bytes for the events (typically this is lower than the in-memory representation). Even given that, the behavior you are describing does sound incorrect though. It shouldn't be the case that the disk buffer would fill up and block before the batch was full. If you are able to reproduce this, could you open a bug report with configuration and reproduction steps? |
Beta Was this translation helpful? Give feedback.
Hi @hemanthofficial3009 !
Buffering happens before batching. For disk buffers, the data will remain in the buffer until it has been processed by the sink and sent to the target.
For disk buffers, it will block by default meaning that it will propagate back-pressure up to any connected components. This behavior can be changed via configuring
when_full
. The only other option currently isdrop_newest
which will drop new events when the buffer is full.For batches, when the batch is full it will be flushed downstream.