We have noticed some interesting content in the Io.js v2.0.0 RC Bulletin. This community version of node. JS is also based on the V8 engine, and the major version is committed much more frequently than its parent project (node. js).
As we mentioned before, we have been keen to develop the Raygun API with node. js to ensure the shortest possible response time in high load conditions, providing the best service to our users. A previous blog compared the performance of node. js with Io.js, and later Io.js V2 release, we are ready to revisit the performance tests under different circumstances.
Configuration
As before, the following tests synthesized the micro-benchmarks, caveat emptor, huge grain of salt, and so on. In any case, the chart below provides several interesting results, worth thinking about, as well as providing a reference for your own field tests, and you may get a significant speed boost later.
The test environment is: 64-bit Ubuntu VM apachebench. Configured to run 20,000 requests in 100 concurrent runs, resulting in an average of 5 runs.
We tested 2 different project management software versions of node with 2 versions of Io.js. Node is v0.10.38 (the latest version of the 0.10 branch) with v0.12.2 (the latest version available) Io.js we compared v1.8.1 (the latest version of the 1.x branch) with v2.0.0 (the latest release).
The test uses the HTTP module to create a simple server that is set to return a JSON when requested. The results are as follows:
Interestingly, we noticed that node's performance dropped from 0.10 to 0.12, while the Io.js 1.x branch was equivalent to node 0.10, but v2.0.0 was much higher.
When returning a Raw format response, the test shows that Io.js v2.0.0 is 14% faster than node 0.12! They all have a 5% increase in speed over their previous version. The results are good, but we have more to test.
Express.js
Express was and still is a popular choice for quickly building a back-end of a Web project. Last time we introduced his performance, let's see how it behaves in node 0.12 and io.js v2.0.0:
Test results io.js v2.0.0 Fast 4.5%– in an old frame is very good (to know JS ecological changes soon AH)!
Comparison of Koa.js on Node and Io.js
Many of the new frameworks are vying for a place in the JS lightweight framework, where we benchmark some of the more popular benchmarks, one of which is Koa.js, which is written by Express.js's author.
The biggest benefit of using KOA is the ability to use ES6 features-including using the generators and yield syntax to turn on asynchronous code (without a damn callback). This benchmark is started with the [node--harmony] parameter. Logic that involves a simple route and outputs a piece of HTML.
Let's look at how Koa works on Node and io.js:
From Node to io.js the latest version has a 14.8% speed boost-a big gap. If you've seen the latest JS backend framework, it's obvious that Io.js has considerable performance improvements. When running Node in a VM cluster, depending on the scale, this upgrade may be less than a few machines and the corresponding cost of the facility-all free.
Error tracking
We are very fond of raygun performance improvements, and if you have experience with using io.js or Node in the product, please feel free to post in the comments. In addition we have a powerful node error tracking implementation-get a 30-day free trial. Keep improving and keep mistakes away!
Who is the king of performance? (node. js vs Io.js v2.0.0)