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

What can change in a different version #55

Closed
martinthomson opened this issue Dec 1, 2016 · 16 comments
Closed

What can change in a different version #55

martinthomson opened this issue Dec 1, 2016 · 16 comments
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.

Comments

@martinthomson
Copy link
Member

We need to know what can change between versions.

The critical thing for forward compatibility is the ability to signal that a new version is being used. In order to do so, the recipient (the server here) needs to be able to find the version field. Given the current packet layout, that means that we need to guarantee that the connection ID and version bits behave consistently across versions and that no extra fields are added in between the start of the packet and the version.

@martinthomson martinthomson added design An issue that affects the design of the protocol; resolution requires consensus. -transport labels Dec 1, 2016
@ianswett
Copy link
Contributor

ianswett commented Dec 3, 2016

I think only the version bit, where the version is located and it's size need to not change. And in theory, they only need to not change in some small set of packets(ie: the first handshake packets).

We should be very hesitant to move the connection id, and maybe in practice we'll never be willing to because it'll break too many things, but we could in theory.

@martinduke
Copy link
Contributor

At a minimum, the VERSION bit must not change. I argue that there also has to be a MORE_FLAGS bit, and that this must also not change if the receiver can parse where the flags end.

If it is at all possible that a later version might change the length of the connection ID field (as earlier QUIC versions did), we must move the version field in front of conn ID to correctly parse the header.

@martinduke
Copy link
Contributor

After thinking about it a bit, I may be willing to fold on putting the version number first.

It's not too onerous to make host use the full 64 bits of the conn-id until the version is negotiated.

Also, we're looking at quadrillions of connections on a single server before there's much chance of a connection ID collision, and in that case the only consequence is a dropped CHLO. So allowing for > 64 bits in the far future may be a bit too paranoid.

But that means that the "must not change between versions" section I'm proposing should also lock the connection ID length for version negotiation packets.

@ianswett
Copy link
Contributor

Yes, clearly the version bit must not change. And I think it's fine to always have the client use a 64 bit connection id until negotiated, but I think there were a few folks interested in suggesting 128 bit connection ids for future connections. If that becomes a requirement, then putting the version before the connection id may be the way to go?

The benefit of the current approach where the connection ID directly follows the flags is it's easy for load balancers to deal with. That being said, if they're going to have to deal with an extended flags bit, the extra complexity of dealing with a connection id that comes after the version may not matter.

And I do think the MORE_FLAGS bit should be defined. The alternative would be to not use more than one flag byte until after version negotiation is complete, but that may be sub-optimal.

@martinthomson
Copy link
Member Author

We need to remind ourselves of the goal here. The goal is to ensure that a new version of this protocol - really any other protocol, because nothing says that you have to do QUIC or HTTP in the future - can be deployed alongside the version of the protocol that we define, probably on the same server address and port.

QUIC relies on out-of-band configuration. For the HTTP usage, we assume that clients are going to try h2 first. It could be that we decide that compatibility is a mugs game and that the Alt-Svc announcement will need to pick a new port number in order to use a new version.

To be clear, I think that's unlikely. For one, I imagine that Google want to continue to use port 443 when they deploy the standardized protocol. Having a migration path that retains the same port number is a smoother upgrade path. The same arguments for moving to standard-QUIC from Google-QUIC likely apply to leaving standard-QUIC for the next thing.

From what I understand, the initial packets on a flow need to include connection ID always. The initial packets on a connection require the version. That fixes the initial header pretty well. I would suggest that after confirming that the protocol is understood by the other side, almost anything is possible.

@britram
Copy link
Contributor

britram commented Dec 15, 2016

One suggestion here: the version number space could be defined such that the version number field appears as the first 32 bits of the packet if present; i.e. a valid version number & 0x01000000 == 0x01000000, such that the first N bits of the packet either look like:

+-------------+-+------------------------------------------------+
|             |1|      version                                   |
+-------------+-+------------------------------------------------+
| flags       |1|
+-------------+-+ ...

or

+-------------+-+
|   flags     |0|
+-------------+-+ ...
               ^-- version flag

(The current multi-varlen layout of the wire image still seems to me to be unnecessarily fiddly, but that's a larger issue that will receive a separate post to quic@)

@quic-issues
Copy link
Member

quic-issues commented Dec 16, 2016 via email

@martinthomson
Copy link
Member Author

I don't know who @quic-issues is, but they make the same point that I did earlier, namely that we do have some information about the packets - for the client this is out of band, and for the server, it's because they probably don't run RTP or something like that on the same port.

@quic-issues
Copy link
Member

quic-issues commented Dec 17, 2016 via email

@larseggert
Copy link
Member

Do you guys have that email reply stuff working for httpwg?

@martinduke
Copy link
Contributor

martinduke commented Dec 21, 2016 via email

@britram
Copy link
Contributor

britram commented Dec 22, 2016

Agreed. I'm in camp (2), though I'd go further: a given version number should be associated with a relatively small number of possible permutations of header field offsets and lengths.

@martinduke
Copy link
Contributor

martinduke commented Dec 28, 2016 via email

@britram
Copy link
Contributor

britram commented Dec 30, 2016

On counterargument one: IMO the most important lesson to take from the transition from Cisco NetFlow version 9 to IPFIX (the latter was based on the former) is that the transition pain for existing deployments tends to be greater when the wire formats are more similar. "Break it once, then don't break it again" would have been much less painful than the "oh so that header diagram looks almost the same so I can safely ignore the rest of the text, there certainly aren't any subtle semantic differences to worry about there" transition that we got.

On counterargument two: not sure I follow... is the argument here that we want it to be hard for middleboxes to "find" the connection ID? I personally think this counterargument perilously underestimates the human ingenuity (or, if you'd like a negative expression, "sheer unmitigated gall") of middlebox designers, as well as the flexibility of VHDL as a programming environment for expressing hardware packet inspection. We can force there to be a predictable processing cost for this information through an encoding, or by making the connection ID the answer to a puzzle, but doing this through random offsets simply increases middlebox designer annoyance while increasing the potential of hard-to-debug processing errors in middlebox implementations (i.e. operator annoyance) more.

This is probably purely ideological: I just don't see the point of deciding to expose a thing, then making it pointlessly difficult to use. There may be a discussion to be had about encoding information exposed in the wire image as puzzle solutions, in order to make targeted diagnostic usage of these fields possible while making mass usage of them (e.g. for all QUIC flows crossing a network border) costly. However, if we select the set of things to expose properly, and design the semantics of connection ID properly, such mass usage would tend to be useless for nefarious purposes (tracking, surveillance) while still being useful for less nefarious purposes (proactive detection and/or localization of network performance issues).

@martinduke
Copy link
Contributor

martinduke commented Dec 31, 2016 via email

@martinthomson
Copy link
Member Author

Quoting @ekr:

I am fine with closing this for now, but it is tied directly to the
question of packet format and in particular how to handle packet
number and connection ID, so it will need revision if we decide
to adopt an encrypted packet number/conn-id proposal (which I
intend to make in Paris if not before).

I think that this is fair: as new information arises we should open new issues for those things. If we decide that a header format change is in order, then we will tackle that then.

@mnot mnot added the has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list. label Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport design An issue that affects the design of the protocol; resolution requires consensus. has-consensus An issue that the Chairs have determined has consensus, by canvassing the mailing list.
Projects
None yet
Development

No branches or pull requests

7 participants