Getting Data In

Controlling forwarder TCP connections to indexer

Jaci
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

dskillman
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

dskillman
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?

Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...