Hello,
I am building an HTTP/2 only client for running multiple requests in
parallel.
I understand that there is no connection pool internally, rather there is
one connection per host. For simplicity, let's say all my requests go to
the same host.

I have a situation where under stress there are some errors. It starts with
socket timeout (several threads in parallel), and after a while there is a
ConnectionClosedException.
I am not sure what is the flow of events that leads to this, and what is
the relationship between those errors. I also don't know if it is my client
or the server that closed the connection.

My initial question is, since there is only one connection maintained
internally, how does one recover from ConnectionClosedException? The
connection life-cycle is opaque to me - there is no pool, and no eviction
strategy, so no concept of creating a new connection. So what am I missing? Is
the httpClient object still usable after a ConnectionClosedException?

Somewhat related, I am looking at the sample here:
https://hc.apache.org/httpcomponents-client-5.3.x/migration-guide/migration-to-async-http2.html
What is the difference between the two socket timeout configurations, on
IOReactorConfig and ConnectionConfig? What is the time to live?

Thanks,
Jonathan

Reply via email to