Skip to content

perf: reduce relay traffic for holepunches in the multipath world #3876

@matheus23

Description

@matheus23

Anecdotally (I don't remember the exact numbers right now), iroh 0.35 holepunched with ~3-4kB of relay traffic under normal conditions (let's say, 40-50ms relay RTT, somewhere between 10-100ms RTT between the endpoints that want to holepunch).

In some dogfooding tests recently, the new multipath- and quic-nat-traversal-based hole-punching iroh sends more data via the relay:

Connected to 49975e383823c4ae09ae196fafa45b9e24f9e2f2d8b1312f5c2a2dfee2eb655c
Sent: "be12a8cde3 is saying hello!"
[49975e3838] Connection type changed to: Relay(RelayUrl("https://staging-euw1-1.relay.iroh.network./")) (RTT: 189.01663ms)
[49975e3838] Connection type changed to: Ip(176.199.209.244:26743) (RTT: 49.69848ms)
Received 10.00 MiB in 8.8536s (1.13 MiB/s, time to first byte 0.063306306s, 3681 chunks) (Shutdown took 0.0000s)
Path stats:
  Relay(RelayUrl("https://staging-euw1-1.relay.iroh.network./")): RTT 132.205998ms, tx=10385, rx=35209
  Ip(176.199.209.244:26743): RTT 96.374115ms, tx=96839, rx=10707656

In this instance, even though most of the traffic was sent via the hole-punched path, 10KB were still sent via the relay, and 35KB were received.

We can and should strive to reduce those numbers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c-irohFunctionality of the core iroh crate.multipathQUIC Multipath in irohperfperformance related issues

    Type

    Projects

    Status

    👍 Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions