3 ms·
Well, in Java I serve rpc requests and doing heavy processing from the same thread all the time, and it works great. What would we have to do in node to get th
by jbooth 15y ago
Well, in Java I serve rpc requests and doing heavy processing from the same thread all the time, and it works great.
What would we have to do in node to get the same level of performance? We'd need a front end instance delegating requests to 8 back-end instances for each core? Writing all these bytes over internal pipes and blowing L1/L2 cache all the time as the data moves across cores? At a certain point, isn't it just way easier and more effective to have one thread spinning an accept loop and a threadpool handling the requests, all within one process bound to a port?
As I said upthread, I'm using node for a side project right now and I'm liking server-side js for a variety of reasons, but squeezing every cycle out of the CPU is not one of them.