https://www.youtube.com/watch?v=P9csgxBgaZ8
https://www.youtube.com/watch?v=zphcsoSJMvM
https://nodejs.org/en/docs/guides/dont-block-the-event-loop/
https://medium.com/the-node-js-collection/what-you-should-know-to-really-understand-the-node-js-event-loop-and-its-metrics-c4907b19da4c
Worker Pool
Worker Pool: 4 threads by default.
These are the Node module APIs that make use of the Worker Pool:
- I/O-intensive
- DNS:
dns.lookup()
,dns.lookupService()
. - File System: All file system APIs except
fs.FSWatcher()
and those that are explicitly synchronous use libuv's threadpool.
- DNS:
- CPU-intensive
- Crypto:
crypto.pbkdf2()
,crypto.scrypt()
,crypto.randomBytes()
,crypto.randomFill()
,crypto.generateKeyPair()
. - Zlib: All zlib APIs except those that are explicitly synchronous use libuv's threadpool.
- Crypto: