We 30x'd our Node parallelism
I was building scalable node applications a few years ago for a very large e-commerce player- millions of customers. I think node.js is a great platform, but its apparent simplicity means there are hordes, and I mean like 90+% of the community, that can &quot;just get things done&quot; without understanding what is going on under the hood at all. And to be fair, for most startupy types of companies that need to iterate fast, that is what you want to optimize for.<p>My interview screening question was pretty simple- &quot;Is node.js single threaded or multithreaded?&quot; And to most, they spit back the blogspam headline- &quot;Single threaded!&quot; I think the most correct answer is &quot;its complicated&quot; but would accept that because most people would say that is the &quot;right&quot; answer. So I would follow up with- &quot;what exactly happens in a default installation if we have say... 5 requests come in at exactly the same time to just return some static content from disk?&quot; (Node&#x27;s default threadpool is 4). And here is where you could see their understanding just fell apart. Some would say they would be handled entirely synchronously, others completely in parallel- but then had no idea what the cause of the parallelism was. Very few actually understood that node is an event loop executing javascript backed by a threadpool for async operations.<p>Before reading this post, I was like eh this is a waste of time- its typical medium bullshit- they almost certainly found they were doing some blocking call in the event loop and then removed it and voila, 30x speedup. It was interesting because it was a lot worse! They spent all this time and hard work figuring out everything but what was taking so long in the event loop, and it seems that was the last place they actually looked.<p>Anyway, node can be a highly scalable platform (<a href="https:&#x2F;&#x2F;changelog.com&#x2F;podcast&#x2F;116" rel="nofollow">https:&#x2F;&#x2F;changelog.com&#x2F;podcast&#x2F;116</a>) but you need to understand it or else it will bite you in the foot. When I was last doing this stuff, upwards of 80% of our time was being spent essentially just JSON.parse()&#x27;ing, and we were looking to move to protobufs to avoid that.