Open link2xt opened 5 months ago
The short answer is, yes. In most scenarios we are currently deploying to, latency larger than this is an indicator that the device is offline/things are broken.
There are quite a few things that will break on networks with this kind of latency, for example most hole punching strategies will fail, because routers often keep things open for only around 5 seconds.
There are quite a few things that will break on networks with this kind of latency, for example most hole punching strategies will fail, because routers often keep things open for only around 5 seconds.
If NAT traversal fails, I expect the connection to keep working over relay. I also doubt NAT keeps port mapping for 5 seconds, from a quick search it should be something like 1 minute for half-open and at least a day for two-way open connection. On Linux nf_conntrack_tcp_timeout_established
defaults to 5 days.
this is about the port mappings inside the router, when no connection has been established yet, which are often times much shorter
re relay connection, sure in theory that can be made to work, but it will take some thinking anf work to do so, without making things worse for folks on lower latency connections, as failing fast is often times very desirable
as failing fast is often times very desirable
If I am downloading a file, e.g. transferring a backup on such a bad connection, I want it to eventually succeed, not fail fast.
This 10 s latency is not an artificial scenario, it happens on trains when connection is bad and congested between stations but gets better when the train gets connection. There are times when latency is ~500ms, but it also jumps to >10 s from time to time:
I am also fine with netcheck failing completely, but if netcheck fails I think iroh-net should still keep trying to use the relay.
I have been testing Delta Chat with iroh-gossip realtime channels on a network with high latency (>10s ping) and while Delta Chat worked for sending messages, p2p channels failed to connect.
Apparently netcheck has a very low timeout with no backoff: https://github.com/n0-computer/iroh/blob/4dd69f44d62e3b671339ce586a2f7e97a47559ff/iroh-net/src/netcheck/reportgen.rs#L50-L51
Is it true that there is no way to use iroh-net when network has >5s RTT?