Go v1.10.3 vs Node v10.6.0 Microbenchmark

Looking for a better way to manage your org's technical proposals?
DEPRECATED: This post may no longer be relevant or contain industry best-practices.

This post is making use of the same code from a previous benchmark: Go v1.9.1 vs Node v8.9.0 Microbenchmark. Check that out for some background and code samples if you'd like to try the same experiment. The applications are very simple. There is a global counter which increments with each incoming HTTP request. Both applications reply with the same data format, using simple string concatenation, and no third party libraries.

Here's the command we're using to execute the benchmark:

siege -t 2m -b http://localhost:8000/

The results are as follows:

Node v10.6.0

Transactions: 183506 hits
Availability: 100.00 %
Elapsed time: 119.15 secs
Data transferred: 2.52 MB
Response time: 0.01 secs
Transaction rate: 1540.13 trans/sec <--
Throughput: 0.02 MB/sec
Concurrency: 14.97
Successful transactions: 183506
Failed transactions: 0
Longest transaction: 0.07
Shortest transaction: 0.00

Go v1.10.3

Transactions: 368668 hits
Availability: 100.00 %
Elapsed time: 119.83 secs
Data transferred: 4.81 MB
Response time: 0.00 secs
Transaction rate: 3076.59 trans/sec <--
Throughput: 0.04 MB/sec
Concurrency: 14.95
Successful transactions: 368668
Failed transactions: 0
Longest transaction: 0.07
Shortest transaction: 0.00

Takeaway

Go is 2.00x as fast as Node.js for this particular benchmark. It's worth noting that these Node.js results are the same as they were for Node v8. However the Go v1.10 results are about 20% faster than with v1.9.

Thomas Hunter II Avatar

Thomas Hunter II is a Software Engineer with 18+ years building scalable, production-grade systems. Deep expertise in Node.js, observability, and developer tooling, with a strong track record of driving architectural decisions, mentoring engineers, and improving customer facing technical documentation. Author of 5 books (including O'Reilly), certified by the OpenJS Foundation, and frequent international conference speaker.