Answer the question
In order to leave comments, you need to log in
Parallel socket.io?
Half of the functionality of the site works on socket.io and the user, wherever he is, connects to socket.io, but since this whole thing works in one thread, as a result, the speed drops dramatically on a large number of connections.
Is there a way to scatter users across threads? (Let's say 6 threads, each thread has 1/6 users)
And all of them must have access to shared memory (several arrays, one with constant data, one changes by itself over time, one changes by connections (sockets))
Answer the question
In order to leave comments, you need to log in
It is possible to simply run the node in several processes using Cluster or a good PM2
wrapper
. This is, of course, if I understand the task correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question