set "keepalive timeout", closing the splunk connection every 5 second… #354
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First of all, we have been using the splunk-firehose-nozzle (sfn) for many years and are very happy with it.
Since we are getting ever more data being sent to our Splunk environment, we noticed very unequal loads on the heavy forwarders.
Our Splunk setup consists of 6 HFs with an Azure Load Balancer in front.
Because the sfn tries to keep the connection to splunk open (less or more) forever, the Azure Load Balancer doesn't get a chance to properly balance the load to the HFs.
This is due to this draining the response body all the time.
This PR adds a (hardcoded) interval where it will close the connection every 5 seconds.
We have tested this in all our environments, including production and it solves the issue, we see new TCP connections every 5 seconds, and the load is now nicely equally distributed over all HFs.
For simplicity I choose a hardcoded 5 second interval, we can also opt for :
Please advise...