Node.js v5.4 vs luvit v2.8 Benchmark

February 8, 2016

I ran a simple HTTP benchmark against Node.js v5.4.1 and luvit v2.8.0. Benchmarks were performed using a slightly modified version of the example “Hello World” script provided by both projects and used siege for performing requests. The scripts were modified to send the exact same headers and body content over the wire.


local http = require('http')

http.createServer(function (req, res)
  local body = "Hello Worldn"
  res:setHeader("Content-Type", "text/plain")
  res:setHeader("Content-Length", #body)
end):listen(5000, '')

print('Server running at')


const http = require('http');

const hostname = '';
const port = 5001;

http.createServer((req, res) => {
  var body = 'Hello Worldn';
  res.writeHead(200, { 'Content-Type': 'text/plain', 'Content-Length': body.length });
}).listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);


For each test I would run the server, make several hundred ignored requests, then run a siege for 2 minutes:

  • Node: 29.79 Requests per Second (3549119.15 sec)
  • luvit: 30.79 Requests per Second (3687119.74 sec)

I was a bit surprised, having assumed luvit would have maybe double the throughput as compared to Node, but as you can see the two are nearly tied. Both internally use libuv@1.8.0 which is likely the determining factor for performance.