On Thu, 22 Sep 2022 10:53:52 GMT, tenor-dev <[email protected]> wrote:
> IMHO, it would be great to use the same property as for HTTP/1 connections: > jdk.httpclient.keepalive.timeout > People are already expecting it to work with HTTP/2, but to everyone's > surprise it doesn't. > > It would also be nice to support jdk.httpclient.connectionPoolSize for HTTP/2 > as well, again to avoid surprises. Although I also find that the proliferation of properties is a bit distasteful, I have to disagree on this. The HTTP/1.1 and HTTP/2 connection pools are very different in their purpose and function, and it's unlikely that a single value would fit all. The HTTP/1.1 connection pool contains idle connections. Active connections are not in the pool. The pool may contain several connections to the same server. The HTTP/2 connection pool contains all connections, whether active or idle, but contains only one connection to a given server (it may at most have one TLS and one clear for a given server). The connections remain in the pool when they are in use - because they support multiplexing. There is no notion of "KeepAlive" like in HTTP/1.1, but each peer can close a connection at its own discretion using a GOAWAY frame. For these reasons I would rather have different properties for configuring the different pools. ------------- PR: https://git.openjdk.org/jdk/pull/10183
