Closed marcelkottmann closed 10 months ago
Wow, talk about responding late to issues! :open_mouth: I think that you are right, with keepalive on there should be no need for max sockets, but it shouldn't hurt either.
When there is a spec for requests per second, each client will have multiple high resolution timers making independent requests. This is because you can specify concurrency (number of clients) and requests per second separately, therefore each client can be responsible for making several requests per second, and can have them open in flight.
HTH, and sorry for the inexcusable delay!
Hi, I would like to understand why
maxSockets
is set here to a magic value of10
. Additionally I don't understand why themaxSockets
depends on therequestsPerSecond
inlib/httpClient.js
.I think it's sufficient and I also expected to have a single socket for all http requests if keepAlive option is enabled. So my code change proposal would be to change this to
Maybe there is a usecase I don't see, which makes it necessary to set maxSockets to a higher value.