Running Node.js in Production
summary
Argues that production Node must exit on error so restarts reset state, shows socket errors bubble up and must handle the 'error' event, warns about listener leaks and recommends using eventEmitter.once to avoid closure-retaining leaks. Recommends forever/upstart for process monitoring, strict package.json dependency pinning with proper semver x ranges, and demonstrates haibu (an app server) spawning apps on isolated ports, auto-installing npm deps, proxy load balancing, and using forever for restarts.
AI-written summary · about
chapters (6)
- 0:00Start
- 2:14Listen for Errors
- 3:27Watch your Events
- 9:39Structure your code
- 10:40Option 1: Shared File Descriptors
- 11:08Option 2: Round-Robin Proxy
related talks
17mRunning Node.js in Production
30mNodeJS: Patterns and Tools to Ship to Production with Confidence
47mCreating Enterprise Web Applications with Node.js
30mNode.js Deep Debugging
20mAfter Years of Node in Production, We Still Block the Event Loop
19mNode.js Error Handling
45mAsk the Maintainer: Nodejs
50mDebugging Node.js in Production
