Node.js NotesRohit’s interview study guide

Interview study guide

Node.js, under the hood.

Everything from my two Node.js study docs, merged and reorganised by topic. Every example is run on a real Node, and every one has a walkthrough of what the runtime is actually doing.

Chapters
16
Topics
166
Code samples
544
Added beyond the doc
8
01Node.js FundamentalsWhat Node is made of, what "single-threaded" really means, and how it compares to thread-per-request runtimes.7 topics02The Event LoopHow Node schedules every callback — phases, timers vs setImmediate, nextTick and microtasks, and how to starve it.11 topics03Async PatternsCallbacks, promises and async/await the Node way — combinators, error handling, cancellation and async iteration.12 topics04Buffers & StreamsBytes in memory and data over time — Buffer, the four stream types, backpressure and pipeline.10 topics05ModulesCommonJS and ES modules in Node — loading, caching, shared state, resolution and circular dependencies.9 topics06EventEmitterNode's built-in observer — how emit really runs, errors, listener lifecycles, and when to reach for a real message broker instead.10 topics07ExpressRouting, the middleware chain, responses and centralised error handling in Express 5.10 topics08Authentication: JWT, Sessions & OAuthWho you are vs what you may do — JWT access tokens, refresh-token rotation, sessions, cookies, OAuth 2.0 with PKCE, and Passport.15 topics09SecurityProtecting each boundary — injection of every kind, prototype pollution, XSS, CSRF, headers, CORS and rate limits.14 topics10Performance & MemoryMeasure first — event-loop delay, CPU profiles, memory leaks, garbage collection and weak references.11 topics11Scaling: Workers, Processes & ClustersGetting past one thread — worker threads for CPU work, child processes, the cluster module, and what changes on Kubernetes.11 topics12Caching & Rate LimitingDoing less work per request and limiting how many requests you accept — cache-aside, invalidation, stampedes, and rate-limit algorithms.9 topics13TestingTesting async Node code with Jest and node:test — mocks, stubs, HTTP tests and what coverage really tells you.8 topics14Production & DeploymentShipping Node services — package.json and lockfiles, Docker images, logging and tracing, graceful shutdown and zero-downtime releases.10 topics15Architecture, Patterns & DatabasesDesigning Node systems — microservices and their failure modes, messaging, design patterns, and choosing a database.13 topics16Review QuestionsTest yourself — the interview questions from the notes, with worked answers.6 topics

Added marks topics that weren’t in my original doc. Tick Learned on a topic to track what you’ve revised.

Sync progress across devices

Type the same private phrase on your Mac and your phone, and your Learned ticks follow you between them — on every study site.

The phrase never leaves this device: only a fingerprint of it is sent, and the server stores a fingerprint of that. Anyone who knows the phrase could see or change your ticks, so pick something you don’t use elsewhere.

Sync is on in this browser.

Sync ID

This ID must be the same on every device. If another device shows a different one, its phrase is different (capital letters count): tap “Turn off here” on it and type the phrase again exactly.