I made a switch from http.createClient to http.request, the new API. I also made a custom agent for each client that restricts a client to one socket, otherwise the default maxSockets of 5 means each new command to Selenium opens a new connection to the server. When dealing with Saucelabs, the Selenium server is quite a long way away, so the socket open time becomes quite significant.
I made a switch from http.createClient to http.request, the new API. I also made a custom agent for each client that restricts a client to one socket, otherwise the default maxSockets of 5 means each new command to Selenium opens a new connection to the server. When dealing with Saucelabs, the Selenium server is quite a long way away, so the socket open time becomes quite significant.