Skip to content

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

@ManickaP

Description

@ManickaP

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 EnableMultipleHttp2Connections { get { throw null; } set { } }
+    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.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions