V
V
Viktor Arkhipov2017-08-11 01:16:45
JavaScript
Viktor Arkhipov, 2017-08-11 01:16:45

How to choose the capacity of the VDS server for chat?

Hello, please help me choose the server capacity for this task:
- Nodejs + SocketIO chat with the simplest selection of a random person.
- Online 100 - 500 people at the same time.
- Pure text communication without photos, video/audio communication.
- Only best practices in the code .
Hostings have calculators with different parameters, so I would like to know how much CPU / RAM, etc. required for the stable operation of such a service.
Thank you very much in advance!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Stockholm Syndrome, 2019-03-29
@egorlisss

axios.get(`https://api.mojang.com/user/profiles/5dcafb2fbd764a858b253c22079ce358/names`)
.then((data) => {
  let message = '';
  for (let i = 0, l = data.length; i < l; ++i) {
    message += 'name: ' + data[i].name + ', changedToAt: ' + data[i].changedToAt + '\n';
  } 
  send(message);
});

I
Impeeeery, 2017-08-11
@paul-smith

VPS cannot be guessed by the processor.
so take it where you can later add RAM and at least processor cores (you won’t get the speed, there are no services for increasing priority for money).
(but if you took a "weak" version of the processor or HDD instead of an SSD, then you can’t change it to another one, just transfer it to this one)
and if the site loads slowly, then it won’t be fast on the VPS anyway. the site can load faster on a different hosting than on a VPS with a "powerful" CPU and SSD.
with DS, it’s not particularly possible to change, and it costs noticeably more, but it’s a DS, and not one of a bunch of virtual machines on one PC, so the processor is always faster, or at least predictable.

A
Alexander Aksentiev, 2017-08-11
@Sanasol

- Online 100 - 500 people at the same time.

at least it's nothing at all.
The main thing is that the project can be built normally, for example, on 512mb ram I experienced problems when building vuejs projects, even the simplest ones. Those. the server was killing collectors due to lack of memory.
So I recommend> 512 ram, the rest is all the same.
is this how copy-paste of pieces of code from stackoverflow is called now? xD
If you know how to code in best practice, then you should understand how much and what is needed to run such a server. Or did you run bestpractis code only on LAN "all your life"? (there were just staff in the office who learned what ftp is during work after being hired under the guise of experienced ones :D)

D
Dmitry Belyaev, 2017-08-11
@bingo347

In such cases, I conduct tests, although they are somewhat abstract
. In virtualbox, an ubuntu-server is raised, on which the test back
is launched. A benchmark is launched on the host, which breaks to the back through the virtual network and emits a predicted load
. During the test, the virtual machine also collects readings from free and cat /proc/loadavg
The tests are run several times with different settings of the virtual memory and the number of cores / max CPU load.
Thus, it is possible to experimentally check the minimum requirements for VPS / VDS
. I also make an amendment for the fact that I have AMD FX (per many cores are better), and Intel Xeon is more common on servers (per core is better)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question