Node.js performance: Node.js vs io.js

John-DanielGeneral, Raygun Labs17 Comments

You may already be aware that Raygun uses Node.JS for our API nodes that receive your precious crash reporting data (we also do node.js crash reporting if you’re interested). We’ve peaked in the past at more than 110,000 requests per second coming through to Raygun, so performance of our API is important.

What you may not know is that recently Node.JS was forked, and there are now two implementations growing in the community: node.js & io.js.

While there’s plenty more to say about io.js, one of the key focuses was on upgrading the Chrome V8 implementation. The version still in use with Node itself was rather old and completely unsupported by Google.

This led me to wonder, what’s the performance implications of this? I recruited our recent new Raygunner, who also happens to love Node, to investigate!

The test

We’re testing for raw requests-per-second, nothing more. For that reason, we run a benchmark that throws requests at an end point and gets a simple response.

Blank Express App – Using Express middle-ware, but returning a basic ‘hello world’ response.
Raw App – Using no middle-ware, returning a basic ‘hello world’ response.

We ran the test with batches of 20,000 calls, averaging out the throughput.

We ran the tests on:

  1. Node 0.10.25
  2. Node 0.10.36
  3. Node 0.12.0
  4. io.js 1.20

Important note: We also did not do any clustering, this is a single node process running on a single core with ApacheBench running on the same machine. You should be able to get better performance out of production hardware, with clustering, etc. This is a micro benchmark after all.

The results

Express.js RPS Raw HTTP RPS
Node 0.10.25 2079 3010
Node 0.10.36 1940 2813
Node 0.12.0 2002 2872
io.js 1.20 2200 3152


nodejs-iojs-performance

The winner

Right now, io.js wins the performance race here. Also, it seems that node.js is improving slowly which is great. I suspect that with new competition, we’ll see some more improvements.

Another thing to note was the impact of Express. Express is a super powerful framework, but if you’re only using it for nice routing, it may not be worth it (e.g. for an API).

What will we do with Raygun?

At present, io.js is pretty new and even the team behind it have not advocated it for production use yet. As we want our crash reporting solution to be rock solid for our customers, we’ll keep a close eye on io.js and start testing in production once the backing team suggest it’s ready.

Of course, things always change too, so we’ll be running benchmarks in future to see if the Node.js team can close the gap.

We’re all about performance, if you care about software quality too, you might want to try out Raygun to track your app crashes & errors!

We would absolutely recommend Raygun to any business which relies on healthy software to serve there customers. Andrew Schofield, Chief technology officer at Timely. Take a free 14 day trial. Request a short demo of Raygun.

17 Comments on “Node.js performance: Node.js vs io.js”

  1. Jamie

    I’ve found Hapijs more performant than express, but that might just be because it feels more light weight to use. But for straight API stuff, it’s much nicer to work with than express.

    1. mark

      How can you say something is more performant if you haven’t benchmarked it? From everything I have read, hapijs is less performant because it provides more out of the box.

    2. Chris

      I think that for API only projects, is better to use a framework designed only for APIs.

      I personally prefer Restify for that.

  2. Michael Ryan

    I’m curious how this test work work with Koa, compared to Exrpess in terms of overhead… though it would not run (without transpilation) on Node 0.10.x

  3. Pingback: Top Reads February 2015 - Justin Chmura

  4. Pingback: Node performance - hapi, expressjs and restify

  5. Pingback: Leadership on a technical commitee vs hiring and appointing the leader (io.js vs node.js) | Thomas Modeneis

  6. Pingback: Performance Showdown: Node.js vs. io.js v2.0.0

  7. Matt

    Without testing if these are even statistically different this “microbenchmark” is simply meaningless.

    Not to mention that you comment “it seems that node.js is improving slowly which is great”, despite showing that it got slower since the first version (except that it probably didn’t, but you didn’t offer any way to know).

  8. Pingback: NodeJS and io.js are now one - The Raygun Blog

  9. Pingback: NodeJS 4.0.0 is 8% faster – we tested it! | Raygun

  10. Pingback: Node Weekly No.74 | ENUE

Leave a Reply

Your email address will not be published. Required fields are marked *