Runtime Reference · v22 LTS

The anatomy
of Node.js

Seven layers stacked between your JavaScript and the kernel. Every fs.readFile hops through all of them. Click any block in the diagram, any card below, or any highlighted term to see exactly what it does and how it talks to its neighbours.

07
Layers
11
Components
60
Glossary terms
∞
Callbacks
01 — Map

The runtime, visualised.

Your code sits at the top. The kernel sits at the bottom. Every layer in between exists to make synchronous-looking JavaScript actually behave like a non-blocking, event-driven, multi-platform system. Click any node.

Architecture · top → bottom
JS world Bridge Native OS
L1 · App L2 · API L3 · Bridge L4 · Engine L5 · Loop L6 · I/O L7 · Kernel Your JavaScript application user code · npm packages · framework code Node.js core APIs fs · http · crypto · net · stream · events · child_process · worker_threads C++ bindings · N-API marshall JS args ⇄ C++ types · invoke native code · return via V8 API V8 engine Ignition · Sparkplug Maglev · TurboFan Orinoco GC libuv cross-platform async I/O library handles · requests Native libraries OpenSSL · llhttp nghttp2 · c-ares zlib · brotli · ICU Event loop timers · pending · idle · prepare poll · check · close Thread pool UV_THREADPOOL_SIZE default 4 · max 1024 I/O multiplexer epoll · kqueue · IOCP Blocking syscalls read · write · open · fsync · getaddrinfo Kernel · Operating System VFS · network stack · scheduler · memory · file descriptors
02 — Components

Eleven components, end to end.

Each card is a layer or a sub-layer. Click for the deep cut: what it actually does, how it interfaces with its neighbours, and a glossary of the terms involved. Highlighted terms are clickable too.

Back to JIT-Atlas