-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Programmatic probing of new paths #1772
Comments
Migration is typically involuntary, e.g. due to a user switching networks. We don't currently have an API to spontaneously probe a new path, but it could probably be implemented. Can you elaborate on your use case for programmatic migration? |
Elaborating a little: typically you'd bind your client endpoint to a wildcard IP, which will cause involuntary migration whenever the host's default route changes, e.g. due to moving between wifi networks and/or a cellular modem. |
There is time for pre-validation when the user switches to a preferred network. For example, a wifi connection might be cheaper than cellular one, or a wired connection might be faster and more reliable than a wifi connection. Even switching from wifi to cellular can be scheduled if the application has access to the wifi signal strength. We are experimenting with real-time traffic where delay jitter should be kept low. Hopefully, pre-validation results in a less noticeable connection migration. Thanks again. |
I think this would be a reasonable feature for us to have. Maybe something on |
This feature seems quite complicated for us since we are new to quinn (and to some extent to rust as well.) Nevertheless, what do you think about the following high-level plan? We should add a new
If a timeout occurs because It should be the caller's responsibility to switch to the new path, or to delete it. |
No worries, and no pressure; it's just likely to be the fastest path to seeing it happen. We're always happy to answer questions and provide feedback.
I'm wary of extending I guess that's mostly a cosmetic difference from what you're proposing, but let's try to be clear in the code there's still a single primary path and we're only adding tracking for in-flight probes.
Yeah. Per RFC9000 §9.5 we can't half-ass this too much:
This may require some care, as a failed probe will permanently consume a CID while we're still using an earlier-sequenced CID for the active path. The existing queue assumes that all earlier CIDs are retired and all later CIDs are fresh, but with failed probes we'll need to support a single(?) arbitrarily large gap between the current CID sequence number and the next fresh one. Further, we'll need to block probe attempts if no fresh CIDs are available. Probing may be impossible if the peer hasn't issued us enough CIDs.
This sounds good to me.
Sounds good! |
@nemethf and I have been trying to migrate a client connection. It seems, based on the example code, one just need to rebind the client endpoint to a new UDP socket. Is this the recommended approach?
Furthermore, RFC 9000 allows the client to validate a path even before migrating the connection. In
quinn
is it possible to validate a path before rewriting the endpoint address? This would allow us to migrate only when the server can be reached from the new address.Thanks!
The text was updated successfully, but these errors were encountered: