Skip to content

Select paths using reliable per-path RTT - #5

Merged
zzj3720 merged 2 commits into
stillfailfrom
fix/prefer-faster-path
Oct 30, 2026
Merged

zzj3720 merged 2 commits into
stillfailfrom
fix/prefer-faster-path

Conversation

@zzj3720

@zzj3720 zzj3720 commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

A direct IP path can itself traverse an external tunnel or relay. The selector always preferred it to an iroh relay, even when the relay was faster. Comparing the existing RTT values directly is unsafe: multipath acknowledgements can return over another path, producing a combined RTT.

Use the same-path measurements from zzj3720/noq#1 to compare IP and relay paths. Retain the current path if its RTT is unknown, and permit initial path selection before any samples exist. The IP holepunch check also ignores unmeasured paths.

Validation: the original selector regression failed against the prior code. With the protocol fix, 123 iroh library tests and both real-relay regression tests pass on Studio, including unknown-current and no-initial-sample cases.

@zzj3720
zzj3720 marked this pull request as draft October 30, 2026 07:29
@zzj3720 zzj3720 changed the title Choose the faster path across IP and relays Select paths using reliable per-path RTT Oct 30, 2026
@zzj3720
zzj3720 marked this pull request as ready for review October 30, 2026 07:47
@zzj3720
zzj3720 merged commit cdc559a into stillfail Oct 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant