Reference · 45 terms

Glossary

Every short form used across the series. Inside a lesson, hover or tap any dotted term to see the same entry in place.

Node basics

CommonJSCommonJS
Node's older module system that uses require and module.exports and has __dirname and __filename.Lesson 0 →
ESMES modules
The standard module system that uses import and export, needs file extensions in relative imports and allows top-level await.Lesson 0 →
exit codeExit code
A number a program returns when it ends, where 0 means success and anything else means failure.Lesson 0 →
libuvlibuv
The C library inside Node.js that runs the event loop, the thread pool and the operating system calls for files and networks.Lesson 0 →
package-lock.jsonpackage-lock.json
A file that records the exact version of every installed package so every machine gets the same code.Lesson 0 →
runtimeRuntime
The program that runs your code and gives it tools such as files, network and timers; Node.js is a JavaScript runtime.Lesson 0 →
thread poolThread pool
A small group of helper threads (four by default) that libuv uses for file system calls, DNS lookups and some crypto and zlib work.Lesson 0 →
V8V8
The JavaScript engine from Google that turns your JavaScript into machine code and runs it, used by both Chrome and Node.js.Lesson 0 →

Event loop

blocking the event loopBlocking the event loop
Running synchronous work for a long time so that timers, requests and I/O callbacks all have to wait.Lesson 1 →
event loopEvent loop
The loop in Node that waits for finished work and runs one callback at a time, each to the end.Lesson 1 →
microtaskMicrotask
A small job, such as a promise callback or queueMicrotask, that runs right after the current callback ends and before the loop moves on.Lesson 1 →
process.nextTickprocess.nextTick
A Node-only way to run a function right after the current operation, in its own queue that can starve the loop if overused.Lesson 1 →
setImmediatesetImmediate
Schedules a callback for the check phase of the loop, right after I/O callbacks have run.Lesson 1 →

Files and buffers

atomic writeAtomic write
Writing to a temporary file and renaming it over the real file so readers see either the old file or the new one, never a half-written one.Lesson 2 →
BufferBuffer
Node's fixed-size block of raw bytes, stored outside the JavaScript heap.Lesson 2 →
encodingEncoding
A rule that turns text into bytes and back, where UTF-8 uses one to four bytes per character.Lesson 2 →
path traversalPath traversal
An attack where ../ in user input makes a server open a file outside the folder it meant to serve.Lesson 2 →

Streams

backpressureBackpressure
The signal from a slow reader or writer telling a fast source to wait, shown when write() returns false.Lesson 3 →
highWaterMarkhighWaterMark
The buffer size at which a stream counts as full, 64 KiB by default for byte streams and 16 objects in object mode.Lesson 3 →
pipelinepipeline
The safe way to connect streams: it respects backpressure, forwards errors to one place and destroys every stream on failure.Lesson 3 →
streamStream
An object that sends or receives data in small chunks over time so memory use does not depend on the total size.Lesson 3 →
Transform streamTransform stream
A stream that reads input chunks and pushes out changed output chunks, like gzip or an upper-case filter.Lesson 3 →

HTTP servers

keep-aliveKeep-alive
Reusing one TCP connection for many HTTP requests instead of opening a new one each time.Lesson 4 →
requestTimeoutrequestTimeout
Node http server settings that limit how long a client may take to send the headers and the whole request before the server answers 408.Lesson 4 →
slowlorisSlowloris
An attack where a client sends a request very slowly to hold many connections open and use up the server.Lesson 4 →

Node.js servers

Fastify hookFastify hook
A function that runs at a fixed step of a Fastify request, such as onRequest or preHandler.Lesson 5 →
JSON SchemaJSON Schema
A standard way to describe the shape data must have, used by Fastify to check requests and shape responses.Lesson 5 →
middlewareMiddleware
A function that runs in the middle of a request and can read it, change it, answer it, or pass it to the next function.Lesson 5 →

Node.js reliability

graceful shutdownGraceful shutdown
Stopping new work, finishing in-flight requests, closing resources, and then exiting.Lesson 6 →
operational errorOperational error
An expected problem in a correct program, such as a missing file or a timeout, that you handle.Lesson 6 →
programmer errorProgrammer error
A bug in the code, such as reading a property of undefined, after which the safest move is to restart.Lesson 6 →
readiness checkReadiness and liveness checks
Small URLs that tell a platform whether the app is alive and whether it can take traffic right now.Lesson 6 →
structured loggingStructured logging
Writing each log line as a JSON object with named fields so tools can search and filter it.Lesson 6 →
unhandled rejectionUnhandled rejection
A failed promise with nobody waiting for the error; since Node 15 it crashes the process by default.Lesson 6 →

Node.js concurrency

child processChild process
Another program started from your program; execFile and spawn avoid the shell, exec does not.Lesson 7 →
clusterCluster
A Node module that starts several copies of a server as processes sharing one port.Lesson 7 →
concurrency limitConcurrency limit
A cap on how many tasks run at the same moment, so a fragile service is not overloaded.Lesson 7 →
Promise.allPromise.all
Waits for many promises at once and fails as soon as one fails; allSettled waits for all and reports each result.Lesson 7 →
SharedArrayBufferSharedArrayBuffer
Memory that several threads can read and write together; it needs Atomics to avoid lost updates.Lesson 7 →
worker threadWorker thread
A second JavaScript thread in the same Node process, used to run CPU-heavy work without freezing the event loop.Lesson 7 →

Node.js production

CPU profileCPU profile
A recording of which functions the program spent time in, written by node --cpu-prof.Lesson 8 →
heap snapshotHeap snapshot
A file listing every object in memory at one moment, used to find what a leak is holding on to.Lesson 8 →
memory leakMemory leak
Memory that is still reachable but no longer needed, so it grows over time and the garbage collector cannot free it.Lesson 8 →

Node.js interview

prototype pollutionPrototype pollution
An attack that adds properties to Object.prototype so every object in the program gets them.Lesson 9 →
ReDoSReDoS
A denial of service caused by a regular expression that takes exponential time on crafted input.Lesson 9 →