radicle-bins icon indicating copy to clipboard operation
radicle-bins copied to clipboard

Reconnect peer when seeing keepalive

Open viraptor opened this issue 5 years ago • 1 comments

I'm not sure if this is possible to do, but when you restart the seed node, it's going to handle lots of keepalive traffic from previous peers, but will not actually register them.

This may belong to the p2p layer rather than seed (?), but seeing valid keepalives could trigger a query to the peer to re-register them in the list. For short restarts it would keep most old nodes active/available.

viraptor avatar Feb 22 '21 03:02 viraptor

This would potentially be possible if radicle-link programs persist their partial view of the network upon (graceful) exit. I don't think there's a way to react to PING frames in case the persistent address info is wrong, though. Also, actually resuming the TLS session across restarts doesn't seem like a good idea.

Perhaps simply dumping (PeerId, SocketAddr) pairs into a persistent buffer, which is then fed into the bootstrap discovery could improve time to converge after a restart, but I think this would mainly benefit the connectivity of the peer doing this, not the peers which were previously connected.

kim avatar Feb 22 '21 14:02 kim