Description
Symfony version(s) affected: >= 4.3.0
Description
HttpClient, when using the CurlHttpClient internally, uses the CURLMOPT_MAX_HOST_CONNECTIONS option to implement the $maxHostConnections parameter to limit the number of concurrent active requests to a host. However, this option is only available if PHP is compiled against libcurl 7.30 or greater. With previous versions of libcurl, the $maxHostConnections option is silently discarded and the concurrent request count becomes effectively unbounded. This causes issues when queuing a large number of requests to hosts that are rate-limited in some way.
This is mainly an issue for those of us using HttpClient in an enterprise environment; e.g. RHEL/CentOS 7, as this shipped with libcurl 7.29 and cannot be easily upgraded (either due to technical effort or corporate policy).
Possible Solution
The NativeClient implements limiting in its own way. The behavior may need to be adapted to the CurlClient in the case that CURLMOPT_MAX_HOST_CONNECTIONS is not available.
At the very least, if we opt not to fix this because old software is old, this limitation should be documented.