Version Latest
Node.js v22.2.0 (64-bit)
Requirements
Windows 10 / Windows 11 / Windows 7 / Windows 8
Size
27 MB

Node is an asynchronous event-driven JavaScript runtime designed to create scalable network applications. In the following "hello world" example, many connections can be handled concurrently. The callback is fired with each connection, however if there is no work to be done, Node 64 bit sleeps. 

This contrasts with today's more popular concurrency paradigm, which use OS threads. Thread-based networking is inefficient and complicated to operate. Furthermore, because there are no locks, Nodejs users do not have to worry about the process deadlocking. Almost no function in the program performs I/O directly, hence the process never stops. Scalable systems are easily developed in Node since there are no blocks. 

Node.js is modeled after and influenced by systems such as Ruby's Event Machine and Python's Twisted. It takes the event model a little farther. It represents an event loop as a runtime construct rather than a library. In other systems, there is always a blocking call to initiate the event loop. Typically, behavior is defined at the beginning of a script using callbacks, and at the conclusion, a server is started using a blocking call such as EventMachine::run(). In Node.js, there is no such call to start the event loop. It just joins the event loop after running the input script. The tool leaves the event loop when there are no more callbacks to execute. This behavior is similar to browser JavaScript, in that the event loop is concealed from the user. 

HTTP is a first-class citizen in Nodejs, built with streaming and low latency in mind. This makes Node js an excellent choice for the backbone of a web library or framework. 

Nodejs is designed without threads, but it doesn't mean you can't use many cores. Child processes can be created using the child_process.fork() API and are intended to be easily communicated with. The cluster module is built on the same interface and allows you to share sockets between processes to enable load balancing across your cores. 

Also available: Node.js (32-bit)