Skip to content
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

snownet: stagger sending of candidates based on connection state #4164

Open
thomaseizinger opened this issue Mar 16, 2024 · 5 comments
Open
Assignees

Comments

@thomaseizinger
Copy link
Member

Currently, snownet immediately seeds a connection with all available candidates when it is created and keeps adding new ones to it as they are discovered.

With our current use of relays, that results in a lot of candidates that are being exchanged and lots of channels to be formed. In most cases, we should be able to hole-punch and create a connection within ~500ms - 1sec (signalling already subtracted).

Instead of sending all candidates immediately, we should start with host and srflx candidates. Then, if the connection is not established within 1sec, send over the relay candidates, potentially also one by one, i.e. a new candidate every ~100ms.

@thomaseizinger thomaseizinger changed the title snownet: stagger sending of candidates based on connection failure snownet: stagger sending of candidates based on connection state Mar 16, 2024
@thomaseizinger
Copy link
Member Author

It might be better to still send them but delay acting on them.

@thomaseizinger
Copy link
Member Author

It might be better to still send them but delay acting on them.

We !need to add them to the agent before sending so we know that they are actually unique and then the agent starts testing them so we have to delay adding them otherwise they fail because the other party isn't testing them at the same time.

@thomaseizinger
Copy link
Member Author

potentially also one by one, i.e. a new candidate every ~100ms.

To start with, it is probably easier to do all relay candidates at once if we don't see a connection within a second or two.

@thomaseizinger
Copy link
Member Author

Moving this to TODO because I think it will help with fixing #4290.

@thomaseizinger thomaseizinger self-assigned this Apr 9, 2024
@jamilbk
Copy link
Member

jamilbk commented May 1, 2024

I think we're pausing on this? Moving back to No Status

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 a pull request may close this issue.

2 participants