Answer the question
In order to leave comments, you need to log in
10k websocket connections, do you need clusters?
Hello. A project is planned on node js, a pure websocket will be used without wrappers on the client and server sides. (The server will not give statics, it will not deal with anything other than working with ws and the database).
With the usual approach, without clusters, can the server withstand the load of 10k connections?
Assuming that clients will be with variable activity, i.e. some time packets go every second (for example, typing-keystrokes), some time idle.
Of course, the server configuration also matters, but if for example we take a normal server, with 16gb of RAM, Intel Core i7, will there be any slowdowns at peak load? Speed is important.
Answer the question
In order to leave comments, you need to log in
loading in 10k connections the server?
First, find out that the node works in one thread, so at least intel i10, it will not be better from this.
Given what you're asking, you probably don't have much experience.
So you will have a harsh nodejs server that will devour memory with a shovel and withstand at best a couple of thousand connections on one worker, if it’s not completely bad to code.
So without a cluster, you don’t even need to start, but write with the expectation of using several parallel processes.
However, on the other hand, you are unlikely to have / will have such a load at all, so you can try without a cluster. There is no point in wasting energy on a cluster if you end up with a couple of hundred connections.
Therefore, for a start, you can try to drive on one process. And if SUDDENLY there will be such a load, then it will be possible to rewrite it to "finish".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question