Re:An expensive line of code: scaling Node.js on Heroku (2013)
by sjnair96 on Thursday September 29, 2016 @05:15AM
(#12604094)
If you don't mind, could you explain in detail (or link to resources) the points you bring up? It seems extremely interesting.
[ Parent
| on HN ]
Re:An expensive line of code: scaling Node.js on Heroku (2013)
by amelius on Thursday September 29, 2016 @05:21AM
(#12604109)
Well, it boils down to the fact that libuv (part of Nodejs) helps in fair scheduling for I/O resources; but the CPU is a resource too, and there is no scheduling taking place for that resource. Therefore, heavy CPU use without proper yielding can block other activities. Since the CPU is involved even in starting I/O operations, heavy CPU use can also block I/O, and in fact it can block the whole process.