Getting Data In

Controlling forwarder TCP connections to indexer

Splunk Employee
Splunk Employee

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.

Tags (2)
1 Solution

Splunk Employee
Splunk Employee

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?

View solution in original post

Splunk Employee
Splunk Employee

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?

View solution in original post

Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!