HttpClient infinite HTTP/2 connection pooling
Daniel Fuchs
daniel.fuchs at oracle.com
Fri Sep 23 13:44:47 UTC 2022
Hi Anton,
On 23/09/2022 10:02, Anton Keks wrote:
> Do you have any background info, why the possibility wasn't there in the
> beginning?
Probably this paragraph from the HTTP/2 spec:
HTTP/2 connections are persistent. For best performance, it is
expected that clients will not close connections until it is
determined that no further communication with a server is necessary
(for example, when a user navigates away from a particular web page)
or until the server closes the connection.
In the first implementation we have relied on the server's GOAWAY frame
to close the connection and this has never been revisited.
> And another implementation question is still up: why request (read)
> timeout on an open connection doesn't close it?
>
> Or basically, if no request on the connection succeeds, maybe that could
> be a reason to close it automatically? Especially if it has been open
> for very long time.
This is an interesting idea. But the fact that a request times out
doesn't necessary means that a different request to the same server
will also timeout.
best regards,
-- daniel
More information about the net-dev
mailing list