Sep 3, 2018 · 1 min read
This article doesn’t cover fully what Node.js exactly is. You only mentioned once about libuv which is the key to understand Node.
You didn’t said anything about threadpool. Also there are three types of events:
- setImmidiate, setTimeout, setInterval
- IO events (like file reading). Generally almost everything that is in libuv
- System events: simplest, http requests. These are out of event loop, because libuv send them immediately to the system.
That is why you can’t perform (by default) more then 4 reading files at the same moment but you can perform hundreds of http requests. It’s all about threadpool size and mechanism.
Anyway this article is quite good start for middles that want to go deeper.