@alice/ node-runtime-internals
Node.js runtime internals
From the call stack to production profiling: how Node.js schedules work, manages memory and where latency comes from.
- Topics
- 12
- Lessons
- 27
- Quiz questions
- 65
- Study time
- ≈4h
FreeEnglishYou get your own copy and the first Lesson opens.
- Trace a delayed callback through the event loop.
- Read a heap snapshot and identify what keeps an object alive.
01Route
Every Topic opens the next ones.
12 Topics in dependency order. Select a Topic on the map to see what it covers.
02Lesson
Read a little. Answer. Remember.
This is how the first Lesson of the Track opens. In your own copy you answer the Quiz and see the right answer with an explanation.
The first Lesson
Its opening and one question from its Quiz. You can read the whole Lesson now, without signing in.
L01 · 6 min
Inside a stack frame
setTimeout(fn, 100) does not promise that fn runs after 100 ms. It promises that fn will not run sooner.
Node.js keeps timers in a min-heap ordered by expiry time. At the start of each loop iteration, the timers phase runs every callback whose time has passed. Then the loop moves on to pending callbacks, poll, check and close. A timer that expires while the loop is busy elsewhere waits for the next pass.
Start the Track to answer and see the explanation.
Short Lessons
About 9 min each: theory, code and diagrams, one Block at a time.
Quizzes
65 questions to check yourself. Every answer comes with an explanation.
Mastery
A level from 0 to 4 for every Topic. You earn it with answers.
Reviews
A Topic comes back after 1, 3, 7, 16 and 35 days.
03Course syllabus
What the Track covers.
Open a Topic to see its Lessons. Any Lesson can be read without signing in.
T01Call stack and execution contextsFollow a function call from entry to return.
T02Event loop phasesTrack a callback through one turn of the loop.
T03Microtasks and promise jobsPredict when queued callbacks run.
T04Timers and schedulingMeasure the gap between a timer’s scheduled and actual execution.
T05Async functions under the hoodTrace how an async function suspends and resumes.
T06Streams and backpressureControl the rate of data moving between streams.
T07Worker threadsMove CPU-bound work off the event loop.
T08Garbage collection in V8Connect allocation patterns to collection pauses.
T09Memory leaks and heap snapshotsFind the reference that keeps an object alive.
T10Hidden classes and inline cachesInspect how object shapes affect property access.
T11JIT tiers: Ignition to TurboFanFollow a hot function through the compiler tiers.
No Lessons yet.
T12Profiling in productionUse a CPU profile to explain a slow request.
No Lessons yet.
04Start
Start the Track. It becomes yours.
It is free. You get your own copy to study as it is or to change.
Your own copy
The whole Track is copied to your account: 12 Topics, 27 Lessons. The original does not change.
Progress you can see
The Lessons you read, your Quiz answers and the Mastery of every Topic show on your map of the Track.
It adapts to you
Connect the AI agent you already use. It rewrites Lessons for your level and adds new ones. The Track also works without an agent.