Экраны

Public Track/t/:slug

/ 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.

Темы
12
Уроки
27
Вопросы в тестах
65
Время
≈4ч
Начать трек

БесплатноанглийскийПосле входа сразу откроется первый урок.

Перевод устарел
Оригинал обновился.
После трека вы сможете
  • Trace a delayed callback through the event loop.
  • Read a heap snapshot and identify what keeps an object alive.

01Маршрут

Каждая тема открывает следующие.

12 тем в порядке зависимостей. Выберите тему на карте, чтобы узнать, о чём она.

Выберите тему для просмотра

02Урок

Немного прочитать. Ответить. Запомнить.

Так начинается первый урок трека. В своей копии вы отвечаете на тест и видите правильный ответ с объяснением.

Первый урок

Его начало и один вопрос из теста. Урок можно прочитать целиком уже сейчас, без входа.

У01 · 6 мин

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.

A timer expires during a synchronous loop. Why does its callback not interrupt the loop?
  1. The timer resets whenever the loop iterates.
  2. The callback passed to setTimeout waits for the loop to return.
  3. The timer delay starts when the loop returns.
  4. The timer drops the callback when it misses its deadline.

Начните трек, чтобы ответить и увидеть объяснение.

  • Короткие уроки

    Около 9 мин каждый: теория, код и схемы, блок за блоком.

  • Тесты

    65 вопросов, чтобы проверить себя. К каждому ответу есть объяснение.

  • Уровень освоения

    Уровень от 0 до 4 у каждой темы. Он растёт от ваших ответов.

  • Повторения

    Тема возвращается через 1, 3, 7, 16 и 35 дней.

03Программа трека

Что входит в трек.

Откройте тему, чтобы увидеть её уроки. Любой урок можно прочитать без входа.

  1. Т01Call stack and execution contextsFollow a function call from entry to return.24 мин
  2. Т02Event loop phasesTrack a callback through one turn of the loop.34 мин
  3. Т03Microtasks and promise jobsPredict when queued callbacks run.28 мин
  4. Т04Timers and schedulingMeasure the gap between a timer’s scheduled and actual execution.30 мин
  5. Т05Async functions under the hoodTrace how an async function suspends and resumes.17 мин
  6. Т06Streams and backpressureControl the rate of data moving between streams.27 мин
  7. Т07Worker threadsMove CPU-bound work off the event loop.22 мин
  8. Т08Garbage collection in V8Connect allocation patterns to collection pauses.24 мин
  9. Т09Memory leaks and heap snapshotsFind the reference that keeps an object alive.20 мин
  10. Т10Hidden classes and inline cachesInspect how object shapes affect property access.19 мин
  11. Т11JIT tiers: Ignition to TurboFanFollow a hot function through the compiler tiers.

    Уроков пока нет.

  12. Т12Profiling in productionUse a CPU profile to explain a slow request.

    Уроков пока нет.

04Старт

Начните трек, и он станет вашим.

Это бесплатно. Вы получаете свою копию: проходите как есть или меняйте под себя.

  • Своя копия

    Трек целиком копируется в ваш аккаунт: 12 тем, 27 уроков. Оригинал при этом не меняется.

  • Прогресс на карте

    Пройденные уроки, ответы на тесты и уровень освоения каждой темы видны на вашей карте трека.

  • Подстройка под вас

    Подключите ИИ-агента, которым уже пользуетесь. Он перепишет уроки под ваш уровень и добавит новые. Трек работает и без агента.

Начать трек