Friday 25 January 2019

Question about the number of requests a simple node server can handle

Hi allI have two simple node apps (express) behind a load balancer. Between them they can handle about 400 requests per second. (Response time roughly 400 ms, and no lost data).I have a few questions on this please:How exactly can a single threaded app handle so many simultaneous connections? Is it simply a case of when a connection comes in, it quickly adds the request to the event queue, so actually it seems like it is concurrently handling all the requests but really it's just queuing them and processing them when it can?What would be the most effective way to improve the 400 requests per second/400 ms response time without scaling horizontally? For example, would doubling the RAM make a difference? Or adding a second processor? Or even removing express and using core node.js modules for the req/res processing? Or something else?Thank you for your responses.

Submitted January 26, 2019 at 05:50AM by TuckerMcInnes

No comments:

Post a Comment