Who delivers the higher number of concurrent requests?Add to Pieces
We are developing something like an ad proxy or Google Ad Buffer. Service just forward ad HTTP requests to SSPs server. For this purpose, it’s necessary to create many HTTP requests with minimum hardware resources. Therefore we decided to do research and compare programming languages with virtual machines and compiled one.
Nodejs script to run a number of conccurerrent connections to localhost:3008.
I used the ApacheBench (ab) tool for testing. Let’s skip the full hardware specification. I can just tell that I used an I7–8550U CPU.
Trying even more connections here and increasing the concurrent amount to 500.
Tags: go, pointers, http
500 concurrent connection hit CPU limit and Node solution starts struggling but let’s get Go numbers. The script is a bit longer but still short.
As you can see I decided to use fasthttp as the HTTP server. The server is not based on any HTTP lib. So it’s really pure HTTP protocol implementation. Let’s see the result for 100 concurrent requests.
Go is the only winner here especially with the higher number of concurrent requests. So tiny layer running under the V8 engine is not so tiny. With 100 concurrent requests, deliver Go over 18% more requests. 500 concurrent requests increased gain to over 34%.