feat(proto): Server sends NAT traversal probes with active CID#575
Merged
feat(proto): Server sends NAT traversal probes with active CID#575
Conversation
This changes the server-side of the NAT traversal to always send path challenges using the active CID. This means it does not skip probes when there are no more CIDs (currently still limited to 5). It does means the paths are linkable, and this is a violation of a MUST in RFC9000. But this is the direction we want to take right now.
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/noq/pr/575/docs/noq/ Last updated: 2026-04-09T14:14:28Z |
flub
commented
Apr 9, 2026
| } | ||
|
|
||
| /// Returns the number of unused CIDs (neither active nor reserved). | ||
| #[allow(unused)] |
Collaborator
Author
There was a problem hiding this comment.
I'm not sure how sacred this code is. Happy to also delete it but I know a lot of work went into the CidQueue and we are still likely to want to use this at some point.
flub
commented
Apr 9, 2026
Performance Comparison Report
|
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5484.3 Mbps | 8313.0 Mbps | -34.0% | 96.9% / 157.0% |
| medium-concurrent | 5362.5 Mbps | 7545.2 Mbps | -28.9% | 96.2% / 158.0% |
| medium-single | 3827.7 Mbps | 4189.8 Mbps | -8.6% | 89.4% / 96.9% |
| small-concurrent | 3794.6 Mbps | 4884.6 Mbps | -22.3% | 95.7% / 107.0% |
| small-single | 3365.5 Mbps | 4491.0 Mbps | -25.1% | 96.4% / 162.0% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3100.7 Mbps | 3435.9 Mbps | -9.8% |
| lan | 782.5 Mbps | 796.5 Mbps | -1.8% |
| lossy | 69.8 Mbps | 55.9 Mbps | +25.0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
noq is 23.4% slower on average
3583125de5e2b90d8c2fc94496d09314df0a470f - artifacts
Raw Benchmarks (localhost)
| Scenario | noq | upstream | Delta | CPU (avg/max) |
|---|---|---|---|---|
| large-single | 5387.3 Mbps | 7969.5 Mbps | -32.4% | 88.9% / 96.0% |
| medium-concurrent | 5346.5 Mbps | 8050.9 Mbps | -33.6% | 91.0% / 96.8% |
| medium-single | 4084.0 Mbps | 4749.2 Mbps | -14.0% | 85.7% / 95.5% |
| small-concurrent | 3800.8 Mbps | 5302.3 Mbps | -28.3% | 92.6% / 100.0% |
| small-single | 3366.3 Mbps | 4783.1 Mbps | -29.6% | 88.8% / 97.1% |
Netsim Benchmarks (network simulation)
| Condition | noq | upstream | Delta |
|---|---|---|---|
| ideal | 3058.4 Mbps | 4008.7 Mbps | -23.7% |
| lan | 782.5 Mbps | 810.4 Mbps | -3.4% |
| lossy | 69.8 Mbps | 55.9 Mbps | +25.0% |
| wan | 83.8 Mbps | 83.8 Mbps | ~0% |
Summary
noq is 27.5% slower on average
matheus23
approved these changes
Apr 9, 2026
There is no check in front of the call chain that makes sure that CIDs are present. They could be missing e.g. if the path is abandoned.
This was referenced Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This changes the server-side of the NAT traversal to always send path
challenges using the active CID. This means it does not skip probes
when there are no more CIDs (currently still limited to 5).
It does means the paths are linkable, and this is a violation of a
MUST in RFC9000. But this is the direction we want to take right now.
Breaking Changes
Paths are now linkable.
Notes & open questions
This is on the path towards #567.
Closes #574.
An attempt to replace #571 with something much simpler and without
design problems. If combined with increasing MAX_MULTIPATH_PATHS on
the iroh side I expect it to be similarly effective.