-
-
Notifications
You must be signed in to change notification settings - Fork 414
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
Server IP Address Migration #716
Comments
Can you link to the part of the spec where you got this from? Section 9.2 starts with "An endpoint can migrate a connection to a new local address by sending packets containing non-probing frames from that address." and does not seem to restrict this capability to a particular role. (If you're talking about the preferred address stuff, I think that's different from migration.) |
(For reference, this was introduced in #330 while updating to draft 20.) |
It is right in the last paragraph of the super section 9:
Also in section 9.6 it says:
|
But indeed when starting reading I was optimistic as well, because the document kept talking about endpoints .... well until I hit those paragraphs. |
I've asked some questions in the implementer's Slack, let's see what people come up with. |
Thanks a lot! :-) |
The feedback I got about why this is is basically that coordinating migration when both endpoints can move is a hard problem. How would you solve that in your application? |
I would not. If both endpoints move at the same time, the connection will die. Which is better than dying already when just the server moves. It simply makes the connection more robust, not unbreakable. |
Not sure if that really answers your question. I am assuming that coordination would only be a problem if both move at about the same time. But I am not that familiar with Quic protocol internals, so it might be a harder problem than I am imagining ;-) |
As a nonconformant feature, I'd be hesitant to merge such a feature unless the implementation is very low-impact and obviously correct. There's a significant danger of inadvertently opening up new denial-of-service attacks, and just complicating the maintenance/implementation of conformant functionality. If you're still interested in the functionality, I'd encourage you to experiment in a branch and see how it can be done; even if we can't merge it in the short term, such experimentation is the foundation on which eventual standardization of new functionality occurs. |
@Ralith I believe an implementation could be as simple as to not drop packages. But yeah, I will just do some experimentation and let you guys know about my findings :-) |
I'm interested in this as well. I have a multi-server application in which I control both ends of the connection, and I'm interested in allowing a client to connect to one server and then have that server hand off the connection to another server without closing it. |
Prior discussion is still current; this is a hard problem. Leaving aside the (major, unsolved) protocol design challenges, migrating an existing connection to a different physical servers would require sharing a significant amount of complex state between servers. Some alternatives, relevance depending on exact requirements:
|
I realize that it's an open issue. Having to hand off a bundle of state to the other server wouldn't be a problem, though. That said, something similar to "server preferred addresses" seems potentially workable. What would that look like? |
No worries, just thought I'd confirm the current state since it's been some years.
Specifically it's a tricky problem to implement: we'd need to serialize/deserialize everything (including e.g. internal rustls state, some of which may be behind trait objects), it would fail if you weren't running exactly matching versions of Quinn, etc. Not an absolute obstacle, and perhaps useful independently for restart-in-place, but hard. Conversely, with address validation tokens, session tickets, and/or 0-RTT, it might be very simple and efficient for the application layer to just establish a brand new connection.
Set I don't think we ever actually implemented the client side of this, so current Quinn clients won't switch server addresses as-is, but it would be a relatively straightforward extension. |
The QUIC-NAT-traversal draft https://datatracker.ietf.org/doc/draft-seemann-quic-nat-traversal/ is allowing servers to migrate IP addresses. This is specifically in the setting of p2p. I think currently the proposal there looks fairly reasonable, though I'm not aware of any implementations yet. We (iroh) plan to implement this in Quinn and hopefully upstream it. The picoquic author has also expressed interest in implementing this draft and has been involved in it already. |
I understand from the IETF draft that a server is not supposed to change IP address/port except for migrating to a preferred address at connection setup. Nevertheless in an p2p context, the server and client are pretty much identical once the connection is established. In addition "servers" are not necessarily servers, but can very well be a mobile device changing IP addresses....
So ... could we have a non-standard equivalent of migration in
ClientConfig
as well, defaulting tofalse
obviously?I understand that there might be good reasons for not allowing address migration for the server in the standard. Are those valid in a p2p context? Would it be sensible to provide such an option?
The text was updated successfully, but these errors were encountered: