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

Add an option to disable QPACK for HTTP/3. #38775

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

wang178c
Copy link

Commit Message: Add an option to disable QPACK for HTTP/3.
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

Signed-off-by: Haoyue Wang <haoyuewang@google.com>
Copy link

Hi @wang178c, welcome and thank you for your contribution.

We will try to review your Pull Request as quickly as possible.

In the meantime, please take a look at the contribution guidelines if you have not done so already.

🐱

Caused by: #38775 was opened by wang178c.

see: more, trace.

Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @mattklein123
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #38775 was opened by wang178c.

see: more, trace.

@wang178c
Copy link
Author

/assign @RyanTheOptimist

Copy link

wang178c is not allowed to assign users.

🐱

Caused by: a #38775 (comment) was created by @wang178c.

see: more, trace.

@RyanTheOptimist
Copy link
Contributor

/assign @RyanTheOptimist

Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for doing this. Any chance we could add some sort of test in envoy_quic_server_stream_test.cc and envoy_quic_client_stream_test.cc? Might be hard to tell if it "works" but if we could at least test it out. Perhaps we could add something to quic_http_integration_test.cc which enables this in the config and just makes sure that HTTP works as expected?


// Disables QPACK compression related features for HTTP/3 including:
// No huffman encoding, zero dynamic table capacity and no cookie crumbing.
bool disable_qpack = 7;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll need to update the the changelog to mention this new API changelogs/current.yaml.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would also be nice to mention why someone might want to do this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the rationale. Thanks.

…pack

Signed-off-by: Haoyue Wang <haoyuewang@google.com>
Signed-off-by: Haoyue Wang <haoyuewang@google.com>
Signed-off-by: Haoyue Wang <haoyuewang@google.com>
@wang178c wang178c force-pushed the option_to_disable_qpack branch from 8c8091c to d63dbfd Compare March 18, 2025 21:25
@wang178c
Copy link
Author

Looks great! Thanks for doing this. Any chance we could add some sort of test in envoy_quic_server_stream_test.cc and envoy_quic_client_stream_test.cc? Might be hard to tell if it "works" but if we could at least test it out. Perhaps we could add something to quic_http_integration_test.cc which enables this in the config and just makes sure that HTTP works as expected?

Thanks.

Added two session uint tests. For the integration test, I only add the client coverage as it seems quite involved to plumb the Http3PtotocolOptions. These tests nicely catch bugs from previous commit.

Copy link
Contributor

@RyanTheOptimist RyanTheOptimist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great, modulo one comment tweak!

//
// Disables QPACK compression related features for HTTP/3 including:
// No huffman encoding, zero dynamic table capacity and no cookie crumbing.
// This can be useful when an upstream HTTP/3 connection multiplexes multiple downstream connections.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would mention here that this is useful for trading off CPU vs bandwidth.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@@ -280,5 +280,9 @@ new_features:
change: |
Added an :ref:`io_uring <envoy_v3_api_field_extensions.network.socket_interface.v3.DefaultSocketInterface.io_uring_options>` option in
default socket interface to support io_uring.
- area: http3
change: |
Added experimental support for disabling QPACK compression.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please link to the new API field.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Signed-off-by: Haoyue Wang <haoyuewang@google.com>
Signed-off-by: Haoyue Wang <haoyuewang@google.com>
@wang178c
Copy link
Author

Updated the PR as makeRawHttp3Connection is recently moved from source file to header file.

@mattklein123 mattklein123 removed their assignment Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants