Skip to content

[Service-Client] H2 Pool integation and usage in service client#4493

Open
muhamadazmy wants to merge 4 commits intorestatedev:mainfrom
muhamadazmy:pr4493
Open

[Service-Client] H2 Pool integation and usage in service client#4493
muhamadazmy wants to merge 4 commits intorestatedev:mainfrom
muhamadazmy:pr4493

Conversation

@muhamadazmy
Copy link
Contributor

@muhamadazmy muhamadazmy commented Mar 16, 2026

[Service-Client] H2 Pool integation and usage in service client

  • This PR finally enable using of the new H2 pool in the http service client.

Stack created with Sapling. Best reviewed with ReviewStack.

@muhamadazmy muhamadazmy force-pushed the pr4493 branch 4 times, most recently from eb9b4ca to a7b78b3 Compare March 17, 2026 14:25
@muhamadazmy muhamadazmy changed the title [service-client] H2 Pool integaation in service client [service-client] H2 Pool integation and usage in service client Mar 17, 2026
@muhamadazmy muhamadazmy marked this pull request as ready for review March 17, 2026 14:41
@claude
Copy link

claude bot commented Mar 17, 2026

⚠️ Code review skipped — your organization's overage spend limit has been reached.

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.

@muhamadazmy muhamadazmy force-pushed the pr4493 branch 2 times, most recently from 01461e0 to 5857bf0 Compare March 18, 2026 09:51
@muhamadazmy muhamadazmy changed the title [service-client] H2 Pool integation and usage in service client [Service-Client] H2 Pool integation and usage in service client Mar 18, 2026
@muhamadazmy muhamadazmy mentioned this pull request Mar 18, 2026
@muhamadazmy muhamadazmy force-pushed the pr4493 branch 5 times, most recently from 00d518c to 71da9b7 Compare March 19, 2026 10:56
# 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 PR finally enable using of the new H2 pool in the http service client.
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.

1 participant