It is an exciting time for Node.js and there is a lot going on. Version 12 has faster startup times, better default heap limits, an updated V8, a reworked http modul and lots more. See the official Node.js blog for more details.
Node.js has now a well established LTS process and users can expect new releases in April and October. In the past we needed to adapted every version for our platform to support automated hosting. Until now these changes were very different from one version to another, making it difficult to introduce upgrades.
In future, upgrades will be much easier because we have made these adaptions using the new N-API. This binary interface is now stable between Node.js versions so that the next versions will work out-of-the-box.
There are some noteworthy upgrades which improve the performance of apps when running on our platform:
- Faster calls with arguments mismatch - V8 can detect cases where argument adaption is not necessary, reducing the call overhead up to 60%.
- Faster async functions and promises - using async is two microticks faster now.
More secure with TLS 1.3
Node.js 12 got an update to TLS 1.3, which is simpler, faster and more secure. This improvement is not relevant when running on our platform, because TLS termination is done at the loadbalancer level with the same improvements.
The default http parser becomes llhttp
The default http parser is now llhttp, which is a rewrite that is easier to maintain, because its C code is generated from the Typescript llhttp module.
It turns out that llhttp is up to 156% faster than the old http_parser.
Native modules get easier in Node.js
The N-API removes additional burden on native add-on developers and application maintainers who depend on native add-ons. With N-API version 4 native module are not dependent on the Node.js version. As a result pre-built versions can mostly be used, bypassing a necessary native compile step.
Startup time improvements
Node.js 12 has a code cache for built-in libraries with AOT compilation which results in a 30% speedup in starttime. Your apps will load faster than ever before.
Node.js 12 has many exciting improvements. From now on you can use these on Cloudnode. This version will be maintained for the next 2 years.