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

Add timeouts to discovery #2321

Open
ramfox opened this issue May 23, 2024 · 2 comments
Open

Add timeouts to discovery #2321

ramfox opened this issue May 23, 2024 · 2 comments
Labels
c-iroh-net feat New feature or request

Comments

@ramfox
Copy link
Contributor

ramfox commented May 23, 2024

Discovery currently works quickly because our current DNS setup works well. But in theory, especially if someone writes a distributed version of discovery, this can be very slow. In the IPFS paradigm, this also often led to confusion—am I not connecting because the address I received from Discovery did not work, OR did Discovery still not respond?

We should ensure we have a reasonable timeout for discovery.

@divagant-martian
Copy link
Contributor

This uses the default timeout in hickory, which is 5seconds. After retries in practice this is about 10seconds total

@ramfox
Copy link
Contributor Author

ramfox commented May 23, 2024

We have timeouts in our implementation of the discovery trait, but we should include timeouts in our DiscoveryTask (which spawns and runs discovery) so that if other implementations of Discovery don't have timeouts, we have an escape hatch.

@dignifiedquire dignifiedquire added feat New feature or request c-iroh-net labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-iroh-net feat New feature or request
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants