-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Support HTTP/2 METADATA frames #2394
Comments
@birenroy can you make the doc public? Also, do you know offhand if implementing this can use existing extensibility mechanisms in nghttp2 or if it will require nghttp2 patches? |
I believe we can implement it with nghttp2's existing extension support. |
@mattklein123 I've updated the doc link; it should be public now. Sorry about that. |
@tatsuhiro-t ^^^ (FYI) |
I think METADATA frame can be implemented using nghttp2's API because it does not change HTTP/2 protocol semantics (i.e., it can be freely ignored). |
Re-reading a draft, requiring successive METADATA frame until END_METADATA might cause a trouble. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
Hi @tatsuhiro-t , I am assuming you referred to the following sentence in the draft: "If the END_METADATA bit is not set, this frame MUST be followed by another METADATA frame." I can see it is a little misleading. But we don't require METADATA frames to be sent contiguously. I think the sentence tries to say there must be following METADATA frames if END_METADATA is not set. METADATA can interleave with other frame types. It is recommended to send METADATA frames back to back. This way, the peer doesn't need to save the intermediate state for a long time. For some of the METADATA use cases, METADATA is required before any message can be sent or a session can be closed. In those cases, it helps if we submit METADATA as soon as they are available. |
Description: Add MetadataEncoder and MetadataDecoder to codec. I also corrected some of the design decisions in MetadataEnocder and MetadataDecoder so that they are more suitable for codec. Those corrections includes: 1. let StreamImpl owns the decoded metadata, not the decoder. 2. Remove stream_id field in decoder and encoder since stream id is stored in StreamImpl. 3. Remove set/getMaxMetadataSize(), because nghttp2 uses default max frame size. This is the second step towards supporting metadata in envoy. The next step would be add filters to add/delete/modify metadata. Risk Level: Low. Not used. Testing: Unit test. Docs Changes: Release Notes: #2394 Signed-off-by: Yang Song <[email protected]>
Description: Allow envoy to proxy metadata in responses. Risk Level: Low. Not used. Testing: Integration test. (Unit tests will be added with filters) Docs Changes: inline Release Notes: n/a Part of #2394 Signed-off-by: Yang Song <[email protected]>
Description: Add filter interfaces to consume and insert metadata in responses (from upstream to downstream). Risk Level: Low. Not used in production. Testing: Integration tests. Docs Changes: inline Release Notes: #2394 Signed-off-by: Yang Song <[email protected]>
Description: Add MetadataEncoder and MetadataDecoder to codec. I also corrected some of the design decisions in MetadataEnocder and MetadataDecoder so that they are more suitable for codec. Those corrections includes: 1. let StreamImpl owns the decoded metadata, not the decoder. 2. Remove stream_id field in decoder and encoder since stream id is stored in StreamImpl. 3. Remove set/getMaxMetadataSize(), because nghttp2 uses default max frame size. This is the second step towards supporting metadata in envoy. The next step would be add filters to add/delete/modify metadata. Risk Level: Low. Not used. Testing: Unit test. Docs Changes: Release Notes: envoyproxy#2394 Signed-off-by: Yang Song <[email protected]> Signed-off-by: Fred Douglas <[email protected]>
Description: Allow envoy to proxy metadata in responses. Risk Level: Low. Not used. Testing: Integration test. (Unit tests will be added with filters) Docs Changes: inline Release Notes: n/a Part of envoyproxy#2394 Signed-off-by: Yang Song <[email protected]> Signed-off-by: Fred Douglas <[email protected]>
Description: Add filter interfaces to consume and insert metadata in responses (from upstream to downstream). Risk Level: Low. Not used in production. Testing: Integration tests. Docs Changes: inline Release Notes: envoyproxy#2394 Signed-off-by: Yang Song <[email protected]> Signed-off-by: Fred Douglas <[email protected]>
I'm going to close this as this is implemented (to some degree). We can open new issues as needed. |
Add HTTP/3 SETTING_ENABLE_METADATA. Add HTTP/3 METADATA frame type. Add HttpEncoder::SerializeMetadataFrameHeader() method to serialize METADATA frame header. Setting identifier and frame type match HTTP/2 ones, see quiche/spdy/core/metadata_extension.cc. See envoyproxy/envoy#2394 and design document linked therein for HTTP/2 METADATA. HTTP/3 implementation will be very similar. PiperOrigin-RevId: 457048873
Description:
Add support for parsing, interpreting, and serializing HTTP/2 METADATA frames. METADATA is an extension to the HTTP/2 protocol that will be used to convey information about request and response streams out-of-line.
Google will bring the draft METADATA specification to the IETF for standardization. If the specification is adopted and any changes are made as part of the process, we should update Envoy to match.
Relevant Links:
Rough draft METADATA specification: https://docs.google.com/document/d/1DsPjl6qWxhcF28vzJey0xQJ2O2eRKHv7CBXt3EZyDjc/edit?usp=sharing
@alyssawilk @htuch @mattklein123
The text was updated successfully, but these errors were encountered: