Aaron Todd
11/15/2022, 4:03 PMmaxIdleConnections
but says nothing of maximum total connections allowed to be created/active.
I also am not seeing an equivalent of a connectAcquireTimeout
...Aaron Todd
11/15/2022, 4:06 PMjessewilson
11/16/2022, 1:26 PMAaron Todd
11/16/2022, 1:36 PMjessewilson
11/17/2022, 2:12 PMjessewilson
11/17/2022, 2:13 PMjessewilson
11/17/2022, 2:15 PMjessewilson
11/17/2022, 2:16 PMjessewilson
11/17/2022, 2:17 PMjessewilson
11/17/2022, 2:18 PMjessewilson
11/17/2022, 2:19 PMjessewilson
11/17/2022, 2:19 PMjessewilson
11/17/2022, 2:22 PMjessewilson
11/17/2022, 2:26 PMjessewilson
11/17/2022, 2:26 PMjessewilson
11/17/2022, 2:27 PMAaron Todd
11/17/2022, 2:50 PMMy top-level advice is if you deliberately manage your apps own thread pool sizes AND OkHttp’s dispatcher parameters, you’ll get good enough behaviour: it won’t exhaust resources and it’ll also have reasonable latencyReasonable behavior isn't (really) the goal, we are trying to have predictable characteristics (most notably in dealing with failure scenarios and mitigating wide spread outages). Some configuration parameters won't map cleanly (or at all) to some underlying engines, I'm just trying to understand what those parameters are right now w.r.t OkHttp. I may have some additional questions if thats ok as I try to map out OkHttp capabilities.
Aaron Todd
11/17/2022, 2:55 PMAnd also all of the above would make a nice document on our site, we need to do that tooAgreed. It would also be nice to have a request/response lifecycle diagram (e.g. being able to answer when a call is assigned a connection, is it after it's pulled from the queue? before? etc).
Aaron Todd
06/28/2023, 3:58 PMjessewilson
06/29/2023, 3:09 AMjessewilson
06/29/2023, 3:10 AMjessewilson
06/29/2023, 3:10 AMAaron Todd
06/29/2023, 1:06 PMasync
extension which calls enqueue
.
Does an interceptor have enough information to know when a connection is available again? I suppose an event listener/connection listener could signal it 🤔
I get that okhttp is trying to automatically balance performance and resources but this seems like such a common use case I'm surprised there isn't a setting to do it (even if it's not the default). Though, I think I would prefer to be able to just plug in a custom connection pool implementation and that would solve all this as well (and then some). Is there any reason the ConnectionPool
isn't an interface and has to be a concrete implementation that only has a few tuning parameters?jessewilson
06/30/2023, 6:53 AM