A couple years ago, the web was a stateless environment. Interactive features were treated as isolated units within a website, encapsulated within Flash or Java Applets. In 2009, NodeJS was released by Ryan Dahl aiming to create more interactive websites by establishing two-way connections. NodeJS enables asynchronous, event-driven input/output (I/O) making lightweight and efficient connections even in data-intensive applications.
The figure above shows the internal structure of Node.JS. Here, you see that only a single thread (i.e. file I/O, DNS, etc.) connects Node to the rest of an application. This single thread handles all incoming requests concurrently and can interface with one another. The architecture also allows the thread pool to interact with Node.JS’ low-level libraries to perform operations such as database transaction, file system access, etc. The asynchronous processing is done by libuv which enables Node to move without having to wait for the outcome of a current event.