-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Proposal: Eager start of inputs #11493
Description
Context
Logstash is launching workers pipelines initialization and execution in threads and then immediately starting the input threads. This strategy has produced a different behaviour between the Ruby and Java execution:
-
With the Ruby execution the pipelines initialization and execution was almost almost immediate so there was no noticeable delay between the input starting and the worker processing data.
-
With the Java execution the pipeline initialization is slower because of the involved compilation. The pipeline initialization time has been improved in Move class caching from ComputeStepSyntaxElement to CompiledPipeline #11482 but nonetheless it will always take longer than the legacy Ruby execution.
In #11492 we will be making sure that the pipeline initialization is completed before starting the inputs. This is an easier to understand behaviour and will become the default.
Proposal
In some use-cases it might be desirable to have the possibility to eagerly start inputs, especially in conjunction with Persistent Queue enabled to minimize data loss by having inputs start ASAP and write data to PQ while the pipeline initialization is in progress.