1. React
  2. International JavaScript Conference
  3. 2019
  4. A Journey into Node.js Internals

A Journey into Node.js Internals

A deep dive into the event loop, how it works, what its different phases are, and how it enables non-blocking IO.

Tamar Twena-Stern at International JavaScript Conference 2019

Node.js is a very popular server-side framework that is slowly becoming the main platform for developing server-side applications. A lot of phrases are mentioned when developers talk about Node.js, such as ‘Single process with event loop’, ‘Non blocking IO’ , ‘generational garbage collector’, and more. But what do those phrases mean? Is Node.js really single threaded? How do the event loop and other internal mechanisms of the platform really work? In this talk, I will give an overview on some of the platform internals. We will do a deep dive into the event loop, how it works, what its different phases are, and how it enables non-blocking IO. And, of course, we will answer the repeating question – is the event loop single threaded? We will also talk about the JIT compiler and the v8 engine. The session will end with a look at the garbage collector mechanism, the different algorithms that exists in each garbage collector phase, and how we can monitor our software to start detecting memory leaks.