Decomposition of the Main Thread in Node.js to increase throughput
summary
Claims that decomposing Node.js main thread by offloading CPU work, logging and APM to separate processes and threads raises throughput from ~119 rps to ~1,318 rps on one machine. Implements prototypes using worker_threads, cluster and child_process pools, V8 improvements like Orinoco, a faster router/serializer such as Fastify with JSON schema, streaming server‑side rendering moved to threads, off‑process log transport and lightweight APM; reports +27%, +17%, +25% and ~10x end‑to‑end gains.
AI-written summary · about
chapters (24)
- 0:00Intro
- 0:34NODE.JS IN ENTERPRISE
- 1:26MUST-HAVE PART
- 2:43RESPONSE TIME
- 2:59DISPERSION
- 3:44GARBAGE COLLECTION
- 4:07INCREMENTAL COLLECTION
- 4:57PARALLELIZATION
- 6:09WORKER THREADS
- 6:42DEMO APP ARCHITECTURE
- 9:02DECOMPOSING
- 9:54PROCESS POOL
- 10:31THREAD POOL
- 10:49DE/SERIALIZATION
- 11:29IN NOT NATIVE ENV
- 13:30OPTIMIZATIONS
- 14:20FRAMEWORK CHANGE RESULT
- 15:23CLUSTER
- 15:38APPLICATION PERFORMANCE MONITORING
- 18:03SERVER-SIDE RENDERING
- 18:20MICRO FRONTENDS
- 19:09REACT 16
- 20:34DECOMPOSED MAIN THREAD LIBUV THREADPOOL APPLICATION
- 22:37REFERENCES
related talks
33mNode.js: The Road to Workers
49mA Journey into Node.js Internals
35mNodeJS: from single thread to worker threads
28mNode.js: The Road to Workers
22mScaling Node.js and unblocking the Event Loop
13mConcurrency vs Parallelism in Node.js: Understanding the Event Loop & Worker Threads
53mMastering Node.js Performance
53mMastering Node.js Performance
