Reaching Ludicrous Speed
summary
Claims a 10x speedup on an MQTT broker, from 20,000 → 200,000 msgs/s, by removing allocations and teaching V8 to optimize hot code. Uses flame graphs, MDB/solaris diagnostics, perf-style sampling plus a custom UI (zerox) to find anonymous-function and node core hot spots. Builds libraries that recycle call-state (reify/Steed), switches streaming packet construction to cork/uncork to cut GC, and ships a fast logger (Pino) and load tester (autoc Canon). Shows the changes measurably improve throughput and reduce GC pauses in real benchmarks.
AI-written summary · about
chapters (23)
- 0:00Introduction and apology
- 1:04Talk introduction and setup
- 2:32Journey to ludicrous speed
- 3:16MQTT broker performance in 2013
- 4:21Performance optimization quest
- 6:30How Node.js event loop works
- 8:36V8 optimization basics
- 9:17Anonymous functions problem
- 10:45Benchmarking performance gains
- 12:15Parallel function execution
- 13:42Avoiding function allocation
- 14:25Reusing functions with reify
- 16:54Async map performance comparison
- 19:47Steed library and state reuse
- 20:49Hot code path optimization rules
- 21:10Garbage collection impact
- 23:17Allocation vs speed trade-offs
- 23:59Debugging Node.js performance bug
- 26:11Flame graphs and automation
- 27:18ZX tool and live demo
- 29:05Pino logger performance
- 29:47Autocannon HTTP load testing
- 30:52Conclusion and resources
related talks
40mPerf Stories
38mPractical Performance Analysis
24mYou Did What? Understanding Node.js Optimizations
45mThe Joy of Building Large Scale Systems
55mWho cares about speed
40mLudicrous Speed: Designing For Performance on the JVM
23mDecomposition of the Main Thread in Node.js to increase throughput
46mNodeJS Scalibility Tips
