Add H2 connection pool with per-authority multiplexing#4487
Open
muhamadazmy wants to merge 3 commits intorestatedev:mainfrom
Open
Add H2 connection pool with per-authority multiplexing#4487muhamadazmy wants to merge 3 commits intorestatedev:mainfrom
muhamadazmy wants to merge 3 commits intorestatedev:mainfrom
Conversation
e451c07 to
90f1e65
Compare
66efb35 to
17f9a75
Compare
|
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit in Settings → Usage. Once credits are available, reopen this pull request to trigger a review. |
7b5ed03 to
d65720f
Compare
Merged
6e05908 to
3e8628a
Compare
# Summary - Fixes restatedev#4456 by making sure: - Request stream is closed immediately after the we receive a terminal state - Drain the response stream. This also fixes a connection thrashing issue
## Summary - Introduce Connection<C>, a Tower Service-based HTTP/2 connection that multiplexes requests over a single H2 session with semaphore-backed concurrency control - Add TcpConnector service and ConnectionInfo/IntoConnectionInfo abstractions for URI-based TCP connection establishment
## Summary - Add AuthorityPool<C> that manages multiple H2 connections to a single authority (scheme+host+port), creating connections on demand when streams are exhausted and evicting failed ones - Add Pool<C> that routes requests to the correct AuthorityPool via a DashMap<ConnectionInfo, AuthorityPool<C>> - Add PoolBuilder with configurable max_connections and init_max_streams per authority
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add H2 connection pool with per-authority multiplexing
Summary
Stack created with Sapling. Best reviewed with ReviewStack.