Skip to content

Conversation

@gseddon
Copy link

@gseddon gseddon commented Jun 2, 2025

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,

cargo run --example server  -- --dir ./examples --listen 127.0.0.1:4433

@gseddon gseddon force-pushed the only-h3-changes branch from 4acebd7 to e681ebe Compare June 2, 2025 17:11
@gseddon gseddon force-pushed the only-h3-changes branch from e681ebe to 70d5ff3 Compare June 2, 2025 17:16
Copy link
Owner

@hatoo hatoo left a 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

h3 = { version = "0.0.7", optional = true }
h3-quinn = { version = "0.0.9", optional = true }
quinn-proto = { version = "*", optional = true, features = ["aws-lc-rs"]}
Copy link
Owner

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.

Copy link
Author

Choose a reason for hiding this comment

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

missed this, will fix!

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
Copy link
Owner

Choose a reason for hiding this comment

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

👍

@hatoo hatoo merged commit d5678e0 into hatoo:master Jun 4, 2025
18 checks passed
@hatoo
Copy link
Owner

hatoo commented Jun 4, 2025

Thank you!

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.

2 participants