https://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Protectagainstlossofin-flightdata
How can data loss be avoided?
The architecture is such that the UDP data sources must be converted to TCP backed by reliable delivery. Additionally, the forwarders and indexers may be configured to send application level ACKs back to sending forwarders.
splunkd
delivery of packets is as follows:
- data is sent in chunks of 64KB.
- By default the forwarder is not looking for, nor is the indexer signaled to send, ACKs upon block receipt.
- If you wish the forwarder to be configured to ask for ACKs by the indexer upon block receipt, the following items can be configured:
- outputs.conf:
[tcpoutput]
stanza,useACK
value: default is false. This enables the indexer app level ACKing mechanism. The forwarder holds data blocks until the Indexer sends an ACK for this block back to the forwarder. The forwarder will continue to send data blocks while waiting, but if none are ACKed, the forwarder will wait until the readTimeout value is hit, then pick another indexer. - outputs.conf:
[tcpoutput]
stanza,readTimeout
value: default is 300 seconds. - outputs.conf:
[tcpoutput]
stanza,writeTimeout
value: default is 300 seconds. - outputs.conf:
[tcpoutput]
stanza,maxQueueSize
value: default isauto
, which means 500KB withuseACK = false
, or 7MB withuseACK = true
. This setting directly describes/configures the forwarder’s “output queue,” however it also indirectly adjust the forwarder’s “wait queue,” where wait queue size is equal to (maxQueueSize*3).
- outputs.conf:
If their maxQueueSize
is reached, then pressure will be placed back upon the processing pipeline. This probably means that your inputs will start needing to deal with a cache/queue of their own. Inputs queue components by order of backpressure:
- in-memory input queue (inputs.conf:
[tcp]
stanza,queueSize
value: default is 500KB): queue in RAM resident - persistent queue: (inputs.conf:
[tcp]
stanza,persistentQueueSize
value: default is disabled): queue is disk resident
Consider reviewing autolb
to understand ingsetion pipeline delivery.