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!

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...