In addition to enabling keep-alive for HTTP by default, Node.js can perform an automatic restart when important files are changed.
llhttp library, which handle HTTP processing, are now used in the runtime environment.
Node.js 18, which was published in April, will enter long-term support (LTS) the following week in accordance with the release. Running for a total of three years, the even version numbers in Runtime transition to the LTS phase with the release of the odd ones, while the odd ones reach their end of life (EOL) with the release of the subsequent even number. So, Node.js 18 will be supported until April 30, 2025, while Node.js 19 will only be supported until June 1, 2023.
Connection on hold
This new version (Node.js 19) enables
keepAlive by default. Outgoing HTTP(S) connections are subject to the keep-alive feature included in HTTP/1.1, which reuses the current connection and often increases performance. The timeout is set by default to 5 seconds.
Better performance will result from enabling
keepAlive since connections are reused by default.
Additionally, the agent may now interpret any response
keepAlive messages that the servers may send. The client is told how long to stay connected via this header. On the other hand, when the
close() method is used, the Node.js HTTP server will now immediately disconnect inactive clients (who are utilizing HTTP Keep-Alive to re-use the connection).
Furthermore, there may be a default improvement in throughput/performance for Node.js HTTP(S)/1.1 requests.
Crypto is now Stable!
Node.js 19 stabilizes the WebCrypto API, which can be used by
require('node:crypto').webcrypto (with an exception if using the following algorithms: X448, X25519, Ed448, and Ed25519)
Watch Mode available
Strictly speaking, the (almost) new command line parameter
--watch, which is still marked as experimental, has already made it into the 18 series of the runtime environment, which has been known since version 18.11. If it is active, Runtime checks a file for changes and, if so, restarts the process. It can be activated when a file is run by:
node --watch index.js
A fast update on new important changes within the new Node.js version. As the latest LTS version 16 will be deprecated next year you should consider updating to either 18 LTS or 19. This process could cause severe damage to your apps and you should as early as possible.
My suggestion: Start now!
Also, beyond the innovations, it is worth noting that Node.js 19 no longer offers a connection for the analysis tools DTrace, SystemTap, and ETW (Event Tracing for Windows). Keeping the interaction with the tools up to date is obviously too complex.
Feel free to connect with me on Medium, LinkedIn, Twitter, and GitHub.
🙌 Support this content
If you like this content, please consider supporting me. You can share it on social media, buy me a coffee, or become a paid member. Any support helps.
See the contribute page for all (free or paid) ways to say thank you!