I'm looking into the Apache HttpComponent PoolingHttpClientConnectionManager. There are two values for the connection manager as MaxTotal and MaxPerRoute. I have been reading these posts through https://hc.apache.org/httpcomponents-client-4.5.x/current/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html , HttpComponents PoolingHttpClientConnectionManager maxPerRoute and maxTotal? and https://www.baeldung.com/httpclient-connection-management
It seems that the values should be set based on different conditions. But does it mean they need to be adjusted from time to time? For example, service can receive growing traffic which means I need to closely monitor the connections to increase these two values? A service can have peak and offpeak time, so I should always set the value that enough to handle peak traffic.
It seems there are more operation work that needs to be done to make such HttpClient work as expected. Is there a more easily managed HttpClient that can be used?
And are they lazily or eagerly allocation? For example, if I set a higher MaxTotal and MaxPerRoute as 1000, but only use 10, will it consume resources for 1000, or 10?