python-logstash-async icon indicating copy to clipboard operation
python-logstash-async copied to clipboard

BeatsTransport _batch_size

Open cbeaujoin-stellar opened this issue 1 year ago • 2 comments

I think the batch_size should not be equal to 10 but should be equal to constants.QUEUED_EVENTS_BATCH_SIZE.

I.E if constants.QUEUED_EVENTS_BATCH_SIZE = 1500, it will generate 1500/10=150 transactions and that will take lot of time.

cbeaujoin-stellar avatar Feb 15 '24 13:02 cbeaujoin-stellar

We could make it configurable more easily.

The higher the batch_size is the more likely will be transmission errors, like timeouts or maybe processing errors on the Logstash side. While the Beats protocol is designed to handle such problems, I'd still keep the default conservatively low.

What about:

  • making it easier to configure
  • use a dynamic default value like batch_size = max(50, constants.QUEUED_EVENTS_BATCH_SIZE)?

eht16 avatar Mar 03 '24 12:03 eht16

Hi, Yes it sounds a good trade off.

cbeaujoin-stellar avatar Mar 04 '24 15:03 cbeaujoin-stellar

@cbeaujoin-stellar I implemented the new setting QUEUED_EVENTS_BEATS_BATCH_SIZE with a simple default. I think this is OK as the batch size is configurable and users can set it as they like.

eht16 avatar Apr 13 '24 17:04 eht16