Skip to content

feat(noq)!: open path by four tuple#653

Closed
Frando wants to merge 1 commit into
mainfrom
Frando/open-path-by-four-tuple
Closed

feat(noq)!: open path by four tuple#653
Frando wants to merge 1 commit into
mainfrom
Frando/open-path-by-four-tuple

Conversation

@Frando
Copy link
Copy Markdown
Member

@Frando Frando commented May 13, 2026

Description

This adds an option to open paths with a specific local IP. To not give Connection::open_path a third argument this adds a OpenPathOpts which contains the initial path status and the optional local IP.

Breaking Changes

  • Changed: noq::Connection::open_path and open_path_ensure now take an opts: OpenPathOpts argument instead of initial_status. Use OpenPathOpts::default().initial_status(PathStatus::Backup) to set the initial status. The default is PathStatus::Available

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

@Frando Frando force-pushed the Frando/open-path-by-four-tuple branch from d062111 to fce5351 Compare May 13, 2026 18:19
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Performance Comparison Report

d062111d7403f5b20011f938107b9bb44e1e92d4 - artifacts

No results available

---
fce53514c48923ce53aa5e6e58929e869d8b948c - artifacts

Raw Benchmarks (localhost)

Scenario noq upstream Delta CPU (avg/max)
large-single 5394.8 Mbps 8012.9 Mbps -32.7% 93.6% / 98.6%
medium-concurrent 5631.1 Mbps 7726.1 Mbps -27.1% 92.9% / 97.8%
medium-single 3585.5 Mbps 4941.0 Mbps -27.4% 93.2% / 101.0%
small-concurrent 3761.2 Mbps 5318.7 Mbps -29.3% 97.7% / 153.0%
small-single 3536.2 Mbps 4841.6 Mbps -27.0% 90.3% / 98.1%

Netsim Benchmarks (network simulation)

Condition noq upstream Delta
ideal 3142.8 Mbps 4045.9 Mbps -22.3%
lan 782.4 Mbps 810.3 Mbps -3.4%
lossy 69.8 Mbps 69.8 Mbps ~0%
wan 83.8 Mbps 83.8 Mbps ~0%

Summary

noq is 27.5% slower on average

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/653/docs/noq/

Last updated: 2026-05-13T18:22:38Z

@n0bot n0bot Bot added this to iroh May 13, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 13, 2026
Comment thread noq/src/connection.rs
///
/// [`open_path`]: Self::open_path
pub fn open_path_ensure(&self, addr: SocketAddr, initial_status: PathStatus) -> OpenPath {
pub fn open_path_ensure(&self, addr: SocketAddr, opts: OpenPathOpts) -> OpenPath {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my mind I was expecting to change addr: SocketAddr into network_path: FourTuple. That would mean making FourTuple public I guess but is kind of consistent with how things are named, at least with the internals.

Wonder what @matheus23 's thinks.

@flub
Copy link
Copy Markdown
Collaborator

flub commented May 14, 2026

Not sure if you've looked at the iroh side yet, I've always wondered if the open_path_ensure variant is really needed. If iroh doesn't really need it I'd be happy to remove it.

@Frando
Copy link
Copy Markdown
Member Author

Frando commented May 14, 2026

Replaced by #655

@Frando Frando closed this May 14, 2026
@github-project-automation github-project-automation Bot moved this from 🚑 Needs Triage to ✅ Done in iroh May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants