Fatal Node.js Flaw
summary
Node.js can lose per-request context when an unhandled exception crosses asynchronous boundaries (timers, promises, native bindings, file/module boundaries), making it impossible to determine which request caused a crash. The talk demonstrates tools and mitigations: async_hooks (reconstructs async chains but is experimental and costly), longjohn and rename hacks (restore full traces with roughly 20% overhead), and using clusters with graceful shutdown to reduce downtime but not identify the offending request; domains are unreliable and deprecated.
AI-written summary · about
chapters (28)
- 0:00Introduction
- 2:02About me and Node.js
- 3:05Unhandled exceptions in architecture
- 4:12Causes and consequences of unhandled exceptions
- 5:19Async code barriers and context loss
- 8:30Event Loop and multithreading in Node.js
- 10:12Software bugs and app impact
- 11:35Two approaches to unhandled exceptions
- 12:38Philosophy of shutdown
- 14:44Event Loop context loss and solutions
- 17:12Clusters to solve exception issues
- 19:18Why domains aren't the fix
- 20:20Async resource handling evolution
- 23:35Recovering async chains with Async Hooks
- 24:36Async Hooks not a silver bullet
- 26:01Zones as future context solution
- 27:25Native code and exception handling
- 28:31Practical developer recommendations
- 30:38Q&A
- 33:17Q&A
- 34:21Q&A
- 35:26Q&A
- 36:29Q&A
- 37:56Q&A
- 39:19Q&A
- 41:05Q&A
- 43:12About Open Web and projects
- 46:24Job ads and closing








