React, Flux, GraphQL, Hack, HHVM...? All of this and more!
This article was published online on Alex Hultman's GitHub page and this is only a backup as the article was later removed. Original URL: https://github.com/alexhultman/Node.js-needs-to-die-in-a-fire-and-Golang-is-the-perfect-arsonist
I quit my job after a year, only to meet with another identical Node.js zombie at the new job. Repeating the same old garbage nonsense over and over, being completely certain that Node.js would "outperform any server in the world". Same brainwashed soldier following Node.js headquarter marketing instructions. Of course, anything he wrote in Node.js would clog up and bottleneck our entire platform. He managed to add a 20 second overhead to my 8 second OpenCL calculation. He moved data with Node.js slower than what we computed it.
It is true that Node.js is extremely performant if you compare it with other, highly crippled solutions like PHP or Ruby. However, Ruby on Rails performs so bad that your Intel Xeon becomes as useful as a 99 cent Walmart calculator using it, so comparison doesn't say anything. Node.js certainly takes gold medal in the special olympics, no doubt about it.
I've noticed that golang is becoming popular in back-end and people generally agree that it does outperform Node.js. Some claim the gain is "limited because of networking bottlenecks". Well if your network is a bottleneck then your set-up is bad. Either increase bandwidth or decrease CPU spendings and save money. A faster server does not magically replace your networking infrastructure but it does decrease uptime cost.
I've done many benchmarks of servers, but this time I wanted to test things over a real physical network to see for myself what kind of gain golang can bring. Here are the results (and yes, all servers were at 100% CPU time in one single thread):
Remember, these results are over an actual ethernet cable. Whatever software used, it and only it was responsible for this major performance spectra. We are talking about 500x - 1000x the networking performance depending on software used.
Now, µWS is more of a theoretical limit rather than an actual server you can use. The fact that golang performs at half this limit is incredible given that golang is actually starting to become widespread within the back-end industry. Even though I'm a C++:er at heart, I cannot stop being incredibly pleased with this evolution. If anything, golang is a major leap in the right direction.