P
P
PAJCH2015-12-10 11:36:15
Node.js
PAJCH, 2015-12-10 11:36:15

Simultaneous requests in nodejs?

I found out the answer
The reason was that the browser has a number of limitations, as I thought, and that I used the express module, it turns out that this module works very poorly, especially when users accumulate, on a pure http module, I process about 6k rps per second
Here is the code:
9335ba366c6d4cda8951e75aff1c750a.png2dc873f734894d01af05b11bbd26c6a1.png
Nodejs server with clustering can only accept 250 requests per second for me, how can I make it so that it can receive about 3000 requests per second, because mongodb can accept 3000 requests per second from me? Maybe the reason is that my machine only has 8 GB of RAM and 4 cores, and that the server is on the local host and there are a number of restrictions?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Belyaev, 2015-12-10
@PAJCH

on 8 gigabytes of RAM and 4 cores of 3.6 GHz, a cluster of 4 node processes quietly processes about 20-30 thousand full-fledged (with access to radish and database) requests per second.
You need to look at your code, you are doing something wrong

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question