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 ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...