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

[API Proposal]: [HTTP/3] Support multiple HTTP/3 connections #101535

Open
ManickaP opened this issue Apr 25, 2024 · 4 comments · May be fixed by #101531
Open

[API Proposal]: [HTTP/3] Support multiple HTTP/3 connections #101535

ManickaP opened this issue Apr 25, 2024 · 4 comments · May be fixed by #101531
Assignees
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net.Http
Milestone

Comments

@ManickaP
Copy link
Member

ManickaP commented Apr 25, 2024

Background and motivation

Similarly to HTTP/2, we want to introduce support for multiple HTTP/3 connections.

Both HTTP/2 and HTTP/3 have stream limits. As RFC Bidirectional Streams suggests, the minimum is 100, which is the current Kestrel default. As #35088 states, this becomes a bottleneck for service-to-service communication, e.g. gRPC.

Implementation depends on #101534.

Original issue: #51775

For comparison with HTTP/2 see the original issue #35088

API Proposal

namespace System.Net.Http;

public sealed partial class SocketsHttpHandler : System.Net.Http.HttpMessageHandler
{
    public bool EnableMultipleHttp3Connections { get { throw null; } set { } }
}

API Usage

var client = new HttpClient(new SocketsHttpHandler()
{
    EnableMultipleHttp3Connections = true
})
{
    DefaultRequestVersion = HttpVersion.Version30,
    DefaultVersionPolicy = HttpVersionPolicy.RequestVersionExact
};

Alternative Designs

N/A

Risks

None. It's an opt-in, default will be false, keeping the original behavior in place.

@ManickaP ManickaP added the api-suggestion Early API idea and discussion, it is NOT ready for implementation label Apr 25, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Apr 25, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@ManickaP ManickaP linked a pull request Apr 25, 2024 that will close this issue
@ManickaP ManickaP removed the untriaged New issue has not been triaged by the area owner label Apr 25, 2024
@ManickaP ManickaP added this to the 9.0.0 milestone Apr 25, 2024
@ManickaP ManickaP self-assigned this Apr 25, 2024
@JamesNK
Copy link
Member

JamesNK commented May 2, 2024

A customer has run into this problem - grpc/grpc-dotnet#2404

They have more than 100 concurrent requests and this limitation is preventing new requests from being sent.

@JamesNK
Copy link
Member

JamesNK commented May 2, 2024

Is EnableMultipleHttp3Connections the right name? What about EnableMultipleMultiplexedConnections that works for both HTTP/2 and HTTP/3.

I imagine whoever wants multiple connections for HTTP/2 would also want multiple for HTTP/3. A property that sets both would be good.

@ManickaP
Copy link
Member Author

We cannot rename the existing EnableMultipleHttp2Connections so the naming suggested here follows the same pattern. With your suggestion we'd have:

  • EnableMultipleHttp2Connections for HTTP/2
  • EnableMultipleMultiplexedConnections for both HTTP/2 and HTTP/3

I will mention you suggestion during API review as an alternative to get the feel for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-suggestion Early API idea and discussion, it is NOT ready for implementation area-System.Net.Http
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants