-
Notifications
You must be signed in to change notification settings - Fork 647
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
Add API for configuring minimum connections for HTTP/2 connection pool #2155
Conversation
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.
I understand a decent bit, and it looks good to me. Have a question about the doc though.
@@ -80,6 +80,10 @@ | |||
* <li>{@link PoolMetrics#idleSize()} always returns {@code 0}.</li> | |||
* </ul> | |||
* <p> | |||
* If minimum connections is specified, the cached connections with active streams will be kept at that minimum | |||
* (can be the best effort). However, if the cached connections have reached max concurrent streams, | |||
* then new connections will be allocated up to the maximum connections limit. |
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.
Hmm, so the code now will do this, right:
For any new HTTP/2 request, if the number of socket connections is below the minimum number of connections, a new socket connection will get created and the HTTP/2 stream will get created on that new socket connection, right?
I don't really get that from the javadoc, but that may just be me.
What does the best effort part mean? I think I'm missing that part in the code and want to make sure I'm not misunderstanding something?
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.
Hmm, so the code now will do this, right: For any new HTTP/2 request, if the number of socket connections is below the minimum number of connections, a new socket connection will get created and the HTTP/2 stream will get created on that new socket connection, right?
yes
I don't really get that from the javadoc, but that may just be me.
What does the best effort part mean? I think I'm missing that part in the code and want to make sure I'm not misunderstanding something?
As we do not have a strong synchronisation between when we return the connection and we acquire the connection we may not be able to stay exactly on the min number that is specified.
I need to think about the proper place for this configuration. Most probably on the level of |
Thanks for this - we are very keen to consume this feature to aid our balancing too! |
This is superseded by #2257 A new API |
Fixes #1808