-
-
Notifications
You must be signed in to change notification settings - Fork 244
Implement experimental HTTP3 support #746
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to keep http3 stuff to client_h3.rs
more. But we can do it later.
Thank you!
Cargo.toml
Outdated
@@ -60,6 +67,13 @@ rustls-native-certs = { version = "0.8.0", optional = true } | |||
tokio-rustls = { version = "0.26.0", optional = true } | |||
rustls-pki-types = { version = "1.7.0", optional = true } | |||
|
|||
h3 = { version = "0.0.7", optional = true } | |||
h3-quinn = { version = "0.0.9", optional = true } | |||
quinn-proto = { version = "*", optional = true, features = ["aws-lc-rs"]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we specify version?
Please add some comment if there are some reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed this, will fix!
@@ -21,12 +21,15 @@ This program is built on stable Rust, with both `make` and `cmake` prerequisites | |||
|
|||
You can optionally build oha against [native-tls](https://github.com/sfackler/rust-native-tls) instead of [rustls](https://github.com/rustls/rustls). | |||
|
|||
cargo install --no-default-features --features rustls oha | |||
cargo install --no-default-features --features native-tls oha |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thank you! |
Uses the h3 library to implement HTTP3 support. Added to all paths - debug, 'standard' and 'fast'. Initial integration test support, however needs more tests to be fully fleshed out.
While H1 and H2 are supported by higher-level abstractions in Hyper, Hyper doesn't have those equivalents for H3 yet. So we must write them ourselves. We have implemented only as much as is necessary for load testing.
This is titled 'experimental' because the H3 crate is still marked as 'experimental'. In practice, it seems to work very well.
Much of the functionality is copied exactly from HTTP2, including the naming of all the functions in client_h3.rs. This should make it easier to review and understand - simply compare to the HTTP2 equivalent.
The main difference is that H3 returns a driver which must be continuously polled to drive the connection until we are finished with it.
HTTP3 also doesn't support unencrypted connections or HTTP1 proxies, so there's a good amount of functionality in Oha we don't have to extend for this H3 implementation.
To test it, you can use the examples in h3 as a server. For example,