Closed stmcginnis closed 3 weeks ago
Local testing is good, so I'm going to merge this. But I would still appreciate any feedback from others to make sure this seems to work as expected and to know if there are any issues with this approach that I've overlooked. Please open an issue if there are any negative side effects from this that I've overlooked.
This adds a
ReuseConnections
configuration flag. When set, this will try to configure the HTTPClient transport to not immediately close connections so that they can be reused by subsequent API calls.Closes: #349
Testing
I ran something that collects a lot of different information from a system. Its original unmodified timing was:
After setting the new reuse flag, the same operations timing was:
I also tried tweaking both
ReuseConnections: true
andMaxConcurrentRequests: 2
and got even better results: