A dive into nodejs I/O
Network Sockets, Files, DNS and threads
8 min readOct 11, 2022
--
Node is a non-blocking JavaScript runtime. You can concurrently run an HTTP Server, read files from disk, send UDP datagrams, accept TCP connections from clients and still have room to execute JavaScript code operations without blocking. Most of these operations are known as I/O, you send an input to a device, file or a socket and it replies back with an output. Node achieves non-blocking I/O with mostly a single thread executed asynchronously using a library called lib_uv.