-
Notifications
You must be signed in to change notification settings - Fork 292
fix(iroh): fix very slow initial connection establishment #3434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
422a364
to
3718ef1
Compare
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3434/docs/iroh/ Last updated: 2025-08-14T12:18:56Z |
1162d92
to
e5771b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super happy with the code duplication, I think it's probably possible to factor out common code for constructing a Transmit
from send_ping_actions
and try_send_ping_actions
, but it's fine, especially since this code won't live that long.
Description
Fixes very slow (~1s) initial connection establishment
Also adds a test for initial connection delay.
Initial connection was very slow even with relays disabled and static discovery. There was a fixed delay.
Breaking Changes
None
Notes & open questions
Question: not sure how we can turn this into a proper test without making it super flaky, since it is a timing test. Maybe measure the ratio between first and second round and have some very conservative bounds?Changed the test name and put the timings in the assertion. I think the test is good to go as is. The ratio is extremely conservative, so it should rarely flake out.
Note: I do 32 connections as an attempt to make the timings more reliable, but strictly speaking it would also work with 1 connection.
Change checklist
quic-rpc
iroh-gossip
iroh-blobs
dumbpipe
sendme