Skip to content

Feature/http3 support 5.x #5311

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

Open
wants to merge 1,224 commits into
base: master
Choose a base branch
from

Conversation

imz87
Copy link

@imz87 imz87 commented Sep 10, 2024

Motivation
This PR introduces support for HTTP/3 in Vert.x, leveraging the existing HTTP/3 facilities provided by Netty. The motivation behind this change is to bring the latest HTTP protocol version to Vert.x, allowing developers to take advantage of the performance improvements and new features that HTTP/3 offers, such as reduced latency, improved security, and better handling of packet loss.

Currently, the PR focuses on adding HTTP/3 support for the client side only. This is the first step towards full HTTP/3 integration in Vert.x. The server-side implementation will be addressed in a subsequent PR, and comprehensive testing will be conducted at that stage.

By enabling HTTP/3 support on the client side, this change positions Vert.x to remain a competitive and modern toolkit for reactive applications. It allows developers to begin experimenting with and utilizing HTTP/3 in their client applications, paving the way for broader adoption once server-side support is complete.

Co-Authored: @zekronium

@imz87 imz87 mentioned this pull request Sep 10, 2024
@vietj vietj added this to the 5.1.0 milestone Sep 11, 2024
@zekronium
Copy link
Contributor

@vietj It should be good for review and open for changes if needed

@vietj
Copy link
Member

vietj commented Oct 28, 2024

@zekronium for now it is on hold until HTTP/3 is part of Netty 4.2 branch

@zekronium
Copy link
Contributor

@vietj Why not have it as an optional dependency. Might take while, whilst other projects are already using it such as netty reactor

@He-Pin
Copy link
Contributor

He-Pin commented Dec 5, 2024

Do you have some numbers to share? we tested HTTP/3 for internal networking (internal RPC) and it shows it performant bad than HTTP/2,

@vietj
Copy link
Member

vietj commented Dec 5, 2024

@imz87 I had to make some internal changes, you should rebase this branch over latest master

@imz87
Copy link
Author

imz87 commented Dec 5, 2024

@imz87 I had to make some internal changes, you should rebase this branch over latest master
@vietj , sure, I'll rebase my branch onto the latest master.

@imz87
Copy link
Author

imz87 commented Dec 5, 2024

Do you have some numbers to share? we tested HTTP/3 for internal networking (internal RPC) and it shows it performant bad than HTTP/2,

@He-Pin
I haven't tested HTTP/3 against anything yet, so I don't have any numbers or statistics to share at this time. I just added Http3Test.java, which is similar to Http2Test.java and serves as a kind of unit test.

@imz87
Copy link
Author

imz87 commented Dec 5, 2024

@imz87 I had to make some internal changes, you should rebase this branch over latest master
@vietj , sure, I'll rebase my branch onto the latest master.

@vietj , I just rebased onto the latest master.

@imz87
Copy link
Author

imz87 commented Jan 21, 2025

Hi @vietj ,

I noticed that there's a NetSocket implementation for HTTP/2, and it seems to be used for WebSocket as well. Is something similar required for HTTP/3? Specifically, would we need a WebSocket based on an HTTP/3 connection?

Thanks,
Iman

@vietj
Copy link
Member

vietj commented Jan 29, 2025

See netty/netty#14739

@vietj
Copy link
Member

vietj commented Jan 29, 2025

@imz87 yes this is needed, the main use case is HTTP CONNECT that tunnels a NetSocket.

@imz87
Copy link
Author

imz87 commented Jan 29, 2025

@imz87 yes this is needed, the main use case is HTTP CONNECT that tunnels a NetSocket.

Ok, thanks for your response.

@indiealexh
Copy link

Looking forward to this so I can switch from websockets to http3 streams.

@imz87
Copy link
Author

imz87 commented Feb 15, 2025

Looking forward to this so I can switch from websockets to http3 streams.

Great to hear! We're excited for you to try it out.

@vietj
Copy link
Member

vietj commented Feb 26, 2025

@imz87 can you rebase this to laster master ?

@imz87
Copy link
Author

imz87 commented Feb 27, 2025

@imz87 can you rebase this to laster master ?

@vietj It's done!

@imz87 imz87 force-pushed the feature/http3-support-5.x branch from 36205c9 to 644dd05 Compare March 14, 2025 11:51
@indiealexh
Copy link

netty/netty#14979 🎆

@zekronium
Copy link
Contributor

netty/netty#14979 🎆

Still need http3 codec

imz87 added 30 commits June 8, 2025 13:19
It avoids the server's stream channel capacity to be affected by the client
TestUtils.randomLong() can return negative numbers, which caused
randConnectTimeout to sometimes be invalid. This fix ensures the
timeout is always positive.
…feature/http3-support-5.x

# Conflicts:
#	vertx-core/src/main/java/io/vertx/core/http/impl/Http1xServerConnection.java
#	vertx-core/src/main/java/io/vertx/core/http/impl/SharedHttpClientConnectionGroup.java
#	vertx-core/src/main/java/io/vertx/core/http/impl/VertxHttpStreamBase.java
#	vertx-core/src/main/java/io/vertx/core/internal/net/SslChannelProvider.java
#	vertx-core/src/main/java/io/vertx/core/net/impl/ConnectionBase.java
#	vertx-core/src/main/java/io/vertx/core/net/impl/NetServerImpl.java
#	vertx-core/src/test/java/io/vertx/tests/http/Http2Test.java
#	vertx-core/src/test/java/io/vertx/tests/http/HttpBandwidthLimitingTest.java
#	vertx-core/src/test/java/io/vertx/tests/net/NetTest.java
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.

8 participants