2 ms·
Not only the simplified code you write with async/await (using babeljs for this today) ... There are a lot of complex processes that are easier to reason agains
by tracker1 12y ago
Not only the simplified code you write with async/await (using babeljs for this today) ... There are a lot of complex processes that are easier to reason against in JS over low level C.
Not to mention, that the article's example is only comparing a small piece of work... A single node instance can easily manage 10K simultaneous requests... launching a thread per request, and you're going to hit resource bottlenecks at the CPU pretty quickly, compared to several node instances approaching a million simultaneous connections on a single server. Node uses not only an even loop, but a shared thread pool for isolation of work without blowing out resource contention.
I've seen issues with even a few thousand threads in poorly written simulation servers... going to an event-loop against a threadpool always worked out better under true load.
- sre_ops 12y agoChapter and verse of this marvelous tale? [Github link] to something that I can pull, throw at it 5k RPS, make it proxy a result from Google?