High performance JavaScript web service using Cluster
You can’t start a discussion nowadays about high traffic web services or somebody will bring up NodeJS and it marvelous performance. Skeptic as I am I test these claims before I believe them. The following code runs pretty fast on my machine, but only uses one core of my CPU: const http = require("http"); http.createServer(function (req, res) { res.writeHead(200); res.end("hello world\n"); }).listen(8000); I ran the following Apache Bench command to test the performance: ab -n 200000 -c 100 http://localhost:8000/ It actually performs pretty good at 15k rps using one CPU core at 100%. This is half the rps compared to Go, mod_php or Jetty, but those all use multiple cores and for one core this measurement is pretty impressive. So much of the claim is true (on one core). ...