go-libp2p
go-libp2p copied to clipboard
tcp / quic: rethink keep-alives
trafficstars
At the moment, we're enabling keep-alives on both the server and the client. In general, it should only be necessary for one of the nodes to send keep-alives. The server should be interested in getting rid of connections, unless the client is still interested in keeping the connection alive, which suggests that keep-alives should only be enabled on the client side.
Going one step further, once we're actually making use of 0-RTT in QUIC, it might make sense to let more QUIC connections run into the idle timeout, if we know that we can easily reestablish a 0-RTT connection to that server.