For the reqstatsrv example: lotsofconnection , the test running out of local sockets to create connections against the backend server:
error proxying the request: Get "http://192.168.1.20:9876/endpoint_9": dial tcp 192.168.1.20:9876: connect: cannot assign requested address
error proxying the request: Get "http://192.168.1.20:9876/endpoint_39": dial tcp 192.168.1.20:9876: connect: cannot assign requested address
error proxying the request: Get "http://192.168.1.20:9876/endpoint_39": dial tcp 192.168.1.20:9876: connect: cannot assign
The dummy reqstatsrv does not support the keep-alive options, so connections cannot be reused, and we hit a number of maximum parallel requests. Also , the loadimpact/k6 script is also using local connections, so when running the test in a local machine we can only handle half of the requests.
Profiling the code, it was found that it was the actual cpu bottleneck:

For the reqstatsrv example:
lotsofconnection, the test running out of local sockets to create connections against the backend server:The dummy
reqstatsrvdoes not support thekeep-aliveoptions, so connections cannot be reused, and we hit a number of maximum parallel requests. Also , theloadimpact/k6script is also using local connections, so when running the test in a local machine we can only handle half of the requests.Profiling the code, it was found that it was the actual cpu bottleneck: