Does a forwarder keep using the initial TCP connection to the indexing server, or does it close the connection after each transfer and open a new connection for the next transfer?
If so, how can I configure the forwarder to close the TCP connection after each transfer and open a new TCP connection for the next transfer?
I'm on Splunk version 3.4.10.
Splunk forwarder doesn't really have a concept of a "transfer". We are typically tailing files on the forwarder and if you have one indexer we will keep that connection open. You could theoretically set the heartbeat (heartbeatFrequency= in outputs.conf) to a high number > 3 minutes and let the tcp connection timeout on it's own via the OS (you could probably tweak the OS to timeout sooner if you really wanted) if you aren't sending any data over the wire. I believe that in 3.4.10 (very old release by the way and would recommend upgrading if you can) even if you are using more than one indexer the connections will stay open.
In 4.x, with AutoLB enabled, the forwarder will make new connections each time it changes between targets. By default every 30 seconds. Typically tearing down and restarting connections is much more resource intensive. What's driving the requirement?
Splunk forwarder doesn't really have a concept of a "transfer". We are typically tailing files on the forwarder and if you have one indexer we will keep that connection open. You could theoretically set the heartbeat (heartbeatFrequency= in outputs.conf) to a high number > 3 minutes and let the tcp connection timeout on it's own via the OS (you could probably tweak the OS to timeout sooner if you really wanted) if you aren't sending any data over the wire. I believe that in 3.4.10 (very old release by the way and would recommend upgrading if you can) even if you are using more than one indexer the connections will stay open.
In 4.x, with AutoLB enabled, the forwarder will make new connections each time it changes between targets. By default every 30 seconds. Typically tearing down and restarting connections is much more resource intensive. What's driving the requirement?