-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Description
Issue Template
Title: *Http2: Need connection policy to allow and control multiple upstream connections. *
Description:
This is related to #7217.
Current default upstream connection scheme doesnt allow you to set a maximum number of streams allowed per connection. This causes upstream load balancing issues as some connections could carry more streams. For example: when upstream is a multiprocess server with shared socket, only few workers receive all the streams.
A connection policy that gives configurable parameters to manage maximum number of streams per upstream connections is needed to solve this problem.
Some implementation approaches:
-
Use current circuit breaking codepath and use the onPoolFailure method to add a case for
maxStreamsOverflow. -
Add another callback in Http::ConnectionPool::Callbacks to handle this case.
Essentially we need to :
- Enqueue the stream if current client stream count exceeds the configured maximum
- Create a new connection
- Process the enqueued stream/request in the context of the new connection.