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

Flags in HTTP/QUIC frames are wasted space #1388

Closed
MikeBishop opened this issue May 24, 2018 · 1 comment
Closed

Flags in HTTP/QUIC frames are wasted space #1388

MikeBishop opened this issue May 24, 2018 · 1 comment
Labels
-http design An issue that affects the design of the protocol; resolution requires consensus.

Comments

@MikeBishop
Copy link
Contributor

Of the frame types defined in the draft, only one frame type actually defines any flags. Otherwise, the flags byte is a wasted byte per frame, every frame.

For the frames which don't use flags, the byte can simply be dropped from the generic frame definition without ill effect. For the one which does (PRIORITY), there are a few reasonable choices:

  • Define a flags byte as the first byte of PRIORITY's payload; PRIORITY effectively remains unchanged
  • Follow QUIC's lead: embed the flags in the type byte; PRIORITY consumes eight values in the frame type space
  • Consider putting priority changes on a separate unidirectional stream (as in Unidirectional Stream Headers in HTTP #1359) and not using control stream frames for them at all. They only need order with respect to each other, not anything else.
@MikeBishop MikeBishop added design An issue that affects the design of the protocol; resolution requires consensus. -http labels May 24, 2018
@martinthomson
Copy link
Member

This is a nice observation. I tend to think of flags as a mistake in h2, but it was always too low on the priority list and they were used a reasonable amount. Here you are right, we could do better. Encoding PRIORITY differently seems like the best choice (8 frame types isn't that big a deal, but it's probably better to use an extra octet in this case).

@MikeBishop MikeBishop added the proposal-ready An issue which has a proposal that is believed to be ready for a consensus call. label May 29, 2018
@mnot mnot removed proposal-ready An issue which has a proposal that is believed to be ready for a consensus call. labels Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-http design An issue that affects the design of the protocol; resolution requires consensus.
Projects
None yet
Development

No branches or pull requests

3 participants