vmware / vmware/go-ipfix

Support TCP keep alive in exporting process

Open
#249 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
52
Forks
34
Avg merge
9h 39m
Merged PRs (30d)
7

Description

Is your feature request related to a problem? Please describe.
Exporting process keeps a connection to collector field for sending records. We currently maintain a goroutine to check connectivity of this connection by calling checkConnToCollector for a default interval (10s).

Describe the solution you'd like
We can replace checkConnToCollector by setting TCP keep alive for the connection. https://pkg.go.dev/net#TCPConn.SetKeepAlive
It will involve some refactoring of exporting process struct. Either add some customize wrapping/casting of TCPConn or keep two connection struct for udp and tcp protocols.

Describe alternatives you've considered
N/A

Additional context
N/A

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the exporting process struct and the checkConnToCollector goroutine, then review how TCP and UDP connections are represented. Use net.TCPConn.SetKeepAlive as the reference and verify that TCP exporting uses keep-alive behavior while UDP support remains intact and the connectivity check is no longer needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.