3 ms·
I'm curious how many cores the server the tests ran on had, and what the performance would be of handling the requests in native node with worker threads[1]? I
by jinnko 2y ago
I'm curious how many cores the server the tests ran on had, and what the performance would be of handling the requests in native node with worker threads[1]? I suspect there's an aspect of being tied to a single main thread that explains the difference at least between tier 0 and 1.
1: https://nodejs.org/api/worker_threads.html https://nodejs.org/api/worker_threads.html
- pretzelhammer 2y agoAs the article mentions, the test server had 12 cores. The Node.js server ran in "cluster mode" so that all 12 cores were utilized during benchmarking. You can see the implementation here (just ~20 lines of JS): https://github.com/pretzelhammer/using-rust-in-non-rust-servers/blob/main/node/server.js#L70-L92 https://github.com/pretzelhammer/using-rust-in-non-rust-serv...
- tialaramex 2y agoDoesn't "the 12 CPU cores on my test machine" answer your question ?