Replies: 1 comment 8 replies
-
The arrows are correct, this is what needs to happen. The latency however confuses me. "Latency" can mean two things: round-trip-time or single-trip-time. In this case it looks like you're describing single-trip-time. Usually we measure latency in round-trip-time. If you get 70ms reported as latency in iroh, then that should mean round-trip-time. In that case, the message should only take 35ms from NodeA to Relay, and so on. So in total it should only take 140ms with 70ms of round-trip-time to the relay for both nodes (assuming they're connected to the same relay). If you can manage to deploy an iroh relay server with, let's say, 30ms round-trip-time to clients, then the RTT to another client should be 60ms approximately. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Regarding the latency issue when using a relay with two nodes:
I'm currently developing a product using iRoh to provide online connectivity for a game.
Node A: My physical machine. Latency with Relay A: 70ms.
Node B: Virtual machine (VM). Latency with the relay: 70ms. Latency with Node A: 1ms. They are on a local area network.
My current testing environment involves two nodes. Endpoint builder section:
They remove
.path_selection(PathSelection::RelayOnly)After a successful hole punch, the latency is approximately 3-8ms. The extra 5ms is likely due to iRoH's own latency, which is understandable.However, when simulating a scenario where two nodes in a symmetrical network, or one node in a symmetrical network, cannot successfully punch a hole and must communicate via a relay, the latency jumps to 270-400ms (using
CMD PING X.X.X.X -t).I understand that a 70ms latency for the relay server is already relatively high, and we can upgrade to a lower 30-40ms server for our final production environment.
The problem is that I don't understand how the 400ms latency is generated. Is it a configuration issue?
My tentative guess is that the overall 400ms latency is caused by:
NodeA -> Relay (Ping 70ms)
Relay -> NodeB (Ping 70ms)
NodeB -> Relay (Pong 70ms)
Relay -> NodeA (Pong 70ms)
70ms * 4 ≈ 280-400ms
That's too high a latency for a game. I think a normal latency, like my server's 30-40ms, or even 100ms for two nodes with a relay, is reasonable. But this is too high. I don't know if this is typical of iRoH. Should I try to fix it with my relay server configuration, or is there something wrong with my setup?
Below are samples:
Beta Was this translation helpful? Give feedback.
All reactions