October Brings Node.js 10.x to LTS and Node.js 11 to Current!
October is always a busy month for the Node.js Project. Node.js 10.x becomes the latest long term support (LTS) release on October 30. Node.js 11 becomes the current release line starting later today (October 23) and for the next six months.
If you are unfamiliar with the Node.js release cycle:
- Even numbered releases are LTS; they generally receive 30 months of support once they become LTS.
- Odd numbered releases are current releases and are supported for six months.
What version should I use?
If you are using Node.js in production use an LTS version. LTS release lines focus on stability, extended support and provide a reliable platform for applications of any scale. Most Node.js users and companies are on Long Term Support lines. For those that are currently using Node.js 4.x or Node.js 6.x, we recommend upgrading to Node.js 10.
If you are interested in trying new features locally, then use the Current release.
As you plan your upgrade, remember that NVM (Linux/Mac) and NVS (Windows) is a great way to manage your installations.
Node.js 10 Performance Gains
Initial benchmarking findings from the Node-DC, which focuses on use cases of Node.js in the data center found:
- Operations per second are nearly 2X higher in Node.js 10 vs Node.js 6;
- Latency has decreased by 65% in Node.js 10 vs Node.js 6;
- The footprint after load is 35% lower in Node.js 10 vs Node.js 6 for increased cold start performance.
While benchmarks don’t always reflect real-world results, the trend is clear that performance has been increasing in each new Node.js release.
What’s exciting about Node.js 10.x becoming LTS?
When Node.js 10.x becomes the latest LTS version, it is ready to be used in production and by applications that need to scale. We originally announced the feature set of Node.js 10 in April. This release line includes performance enhancements, error handling improvements, improved diagnostics around trace events and post-mortem, and has a keen focus on security.
With Node.js 10, Node.js API (N-API) — a stable module API that is independent of changes in V8 — moves out of experimental and is now stable to use. *(Note that is is also now stable in 8.X and has full N-API 1.3 coverage in 6.x so you can use it across all LTS releases). N-API reduces the maintenance cost for native modules and reduces friction in upgrading Node.js versions in production deployments for module consumers. Find the latest insights into the work being done here.
Anyone writing or maintaining native modules should use N-API.
Along with N-API, below are a few additional features that you can now take full advantage of as a Node.js LTS user:
HTTP/2 is ready! HTTP/2 provides huge performance improvements over HTTP/1 — current testing indicates that it can yield a 10X performance improvement over HTTP/1.1. It reduces latency by enabling full request and response multiplexing, minimizes protocol overhead via efficient compression of HTTP header fields, and adds support for request prioritization and server push (read more here).
The server push functionality proactively pushes additional resources together with the response to the original request that it thinks the browser will request later. Later, if the browser really needs them, it uses the already-pushed resources instead of sending additional requests for them. See article Node.js can HTTP/2 push! for more details on this feature and more.
Node.js 10.x is equipped with V8 6.8: Memory management around using trap-based bounds checking on Linux x64 platforms improves WebAssembly execution speed in this latest version of V8.
Improved integration of the V8 and Chrome devtools with the Node.js project gives details into the heap snapshot, which heavily expands the kinds of diagnostic information provided to Node.js users.
What is still experimental in Node.js 10.x?
Experimental features include:
- Workers API: Every worker has its own event loop — similar to what folks experience in the browser; this can also lead to more detailed debugging of workers.
- fs Promises API: This is a useful feature as it allows you to receive promises vs. callbacks.
- Top-level await added in the REPL.
- NodeChakra released with Time Travel Debugging.
- AsyncIterators support on Node.js Readable Streams.
What’s new with Node.js 11?
Current releases allow developers to test the latest Node.js features, however they are not ready to be tested in production.
The focus of Node.js 11 is largely incremental. Features for this release include:
- Interval timers will be rescheduled even if the previous interval threw an error;
- and the build no longer supports FreeBSD 10.
We want to extend a special thank you to everyone who made this release come together, whether you submitted a PR to a feature, helped with our benchmarking efforts, or you were in charge of one of the release versions. The release manager for Node.js 10 and Node.js 11 is James Snell. For a full list of the release team members head here.
If you are interested in contributing to Node.js, we welcome you. Learn more via our contributor guidelines.
*Correction: The blog post originally stated, “Top level await in REPL: This will allow you to just run Node.js in your terminal” this is incorrect. The correct bullet point is “Top-level await added in the REPL.” We apologize for the confusion.