You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting maxConnections or maxConnectionsPerHost doesn't actually limit the number of connections in the okhttp engine. This is likely to cause confusion at best or much worse for teams that actually need hard limits on these resources.
This setting is also inaccurately mapped in the CRT engine since we create a connection manager per host with maxConnections setting. This means the CRT engine may also not respect total maxConnections depending on number of hosts/load.
For OkHttp we should investigate adding a custom gate/limiter that stalls the request and waits for a connection if one isn't available yet. This may require signaling from an event/connection listener to know when connections are released. This would allow us to support max connection settings for okhttp still. For CRT we may need something similar.
The text was updated successfully, but these errors were encountered:
Fixing/enforcing this in OkHttp proved to be difficult. Instead we've decided to relocate maxConnections out of the generic HTTP engine config and allow specific engines to expose this setting if they can meaningfully enforce it. We may revisit this in the future for OkHttp if we find a way to enforce it without detrimental secondary effects on throughput.
Setting
maxConnections
ormaxConnectionsPerHost
doesn't actually limit the number of connections in the okhttp engine. This is likely to cause confusion at best or much worse for teams that actually need hard limits on these resources.This setting is also inaccurately mapped in the CRT engine since we create a connection manager per host with
maxConnections
setting. This means the CRT engine may also not respect totalmaxConnections
depending on number of hosts/load.For OkHttp we should investigate adding a custom gate/limiter that stalls the request and waits for a connection if one isn't available yet. This may require signaling from an event/connection listener to know when connections are released. This would allow us to support max connection settings for okhttp still. For CRT we may need something similar.
The text was updated successfully, but these errors were encountered: