You Don’t Node.js
summary
Explains how Node.js runs one call stack with an external API thread pool and why long CPU tasks or synchronous fs calls block all requests, causing UI hangs or server backlog; demonstrates using node-blocked to detect stalls, using async/await or Promises (Promise.all for parallelism) instead of nested callbacks, creating a connection pool for databases, and remembering there are no default timeouts on network sockets so timeouts and process.on('unhandledRejection'|'uncaughtException') handlers must be wired.
AI-written summary · about
chapters (6)
- 0:00Start
- 9:12General Blocking Rules
- 10:44Mitigation
- 18:04EVERYTHING IS ASYNC
- 24:19CALLBACK STYLE
- 35:29ADDING TIMEOUTS
related talks
22mScaling Node.js and unblocking the Event Loop
41mPut on your asynchronous hat and node
34mYou Don't Know Node.js
49mA Journey into Node.js Internals
13mConcurrency vs Parallelism in Node.js: Understanding the Event Loop & Worker Threads
35mNodeJS: from single thread to worker threads
21mThe Node.js Eventloop Fairytale
28mBryan Hughes - SeattleJS Conference 2017
