-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
HTTP/3: Pool QuicStreamContext instances #34075
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tratcher
reviewed
Jul 6, 2021
src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionContext.cs
Show resolved
Hide resolved
This was referenced Jul 7, 2021
The feature collection needs to be cleared/reset between uses. |
75ef80d
to
45dfcaf
Compare
45dfcaf
to
df76007
Compare
davidfowl
reviewed
Jul 13, 2021
/// <summary> | ||
/// Abstracts the system clock to facilitate testing. | ||
/// </summary> | ||
internal interface ISystemClock |
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.
😢
halter73
reviewed
Jul 13, 2021
src/Servers/Kestrel/Transport.Quic/src/Internal/QuicConnectionContext.cs
Outdated
Show resolved
Hide resolved
halter73
reviewed
Jul 13, 2021
src/Servers/Kestrel/Transport.Quic/src/Internal/QuicStreamStack.cs
Outdated
Show resolved
Hide resolved
halter73
reviewed
Jul 13, 2021
...Servers/Kestrel/Transport.Quic/src/Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.csproj
Show resolved
Hide resolved
halter73
reviewed
Jul 13, 2021
halter73
approved these changes
Jul 13, 2021
Will perf test this together with HTTP/3 stream pooling. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #33680
There are a lot of allocations per HTTP/3 request (transport + stream + pipes + output writer + frame writer + QPack encoder/decoder). I'm pretty sure performance is going to be terrible without pooling. Note that this doesn't pool
System.Net.Quic.QuicStream
, which currently doesn't support reuse, but should be able to in the future.Will wait on merging this PR for basic benchmarks.
TODO:
What happens to features on the stream context? Known features are reset but new features aren't cleared.This only pools QuicStreamContext. The next step is to stash Http3Stream in the feature on the stream context and reuse (how does that overlap with clearing features?)