Vector: Option to configure TCP Keepalive

Created on 30 Oct 2020  路  7Comments  路  Source: timberio/vector

Current Vector Version

0.10

Use-cases

Hi Team,

It would be beneficial to have a option to configure TCP Keepalives (optional).

This would be benefical in environments, where firewalls will close TCP connections due to Idle timeout.

I experienced this, when using Syslog-TLS input.

Attempted Solutions

The present solution would be to increase firewall idle timeout. However, given 1 hr is timeout standard in most enterprise firewall, TCP keepalive makes the more sense.

Proposal

Option to configure TCP Keepalive per input in vector.toml

References

https://discord.com/channels/742820443487993987/746070591097798688/771775364170383411

networking must feature

Most helpful comment

Hey guys, basic TCP keepalive functionality will help us big time.

All 7 comments

cc @jamtur01 for up coming work.

Looks like the TCP keepalive information needs to be propagated to set_keepalive in Tokio's TcpStream.

Unfortunately, the option is missing beginning from 0.3.x and will be reimplemented in future versions. Upstream issue: https://github.com/tokio-rs/tokio/issues/3109.

The new TcpKeepalive configuration will also include interval and retries options, while on 0.2x. (which is currently used) we can only set the keepalive time.

I'd suggest we implement the keepalive time option with the current tokio runtime, as it covers most use cases. For the other options another issue with blockers on the upstream feature and runtime upgrade would be suitable.

@lukesteensen @Hoverbear Thoughts ^^^

Hey guys, basic TCP keepalive functionality will help us big time.

I'd suggest we implement the keepalive time option with the current tokio runtime, as it covers most use cases. For the other options another issue with blockers on the upstream feature and runtime upgrade would be suitable.

@pablosichert that sounds reasonable. Could you open the other issue and reference the blocking issues? We might decide to contribute upstream to unblock work.

@pablosichert Well researched! =D I agree.

@pablosichert Ditto - let's implement based on time and go from there.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valyala picture valyala  路  3Comments

MOZGIII picture MOZGIII  路  3Comments

jamtur01 picture jamtur01  路  3Comments

LucioFranco picture LucioFranco  路  3Comments

raghu999 picture raghu999  路  3Comments