How much hosting does the webRTC operator need?

I will have a webrtc application. All the server needs to do is just send messages, such as room number, ice candidates, disconnections, etc., Only all these messages are for signaling. I use socket.io and node.js.

The server pretty much just passes the text. There are no signatures, there is no database, everything is in memory. It keeps track of the list of users who are online (how many are online) and the list of rooms that are accepted. So, there are several lists of numbers, and it transfers the text between users so that they can connect via webrtc.

Now, obviously, when (if) I get a huge amount of traffic, lists can get the form of large, for example, 10k-20k 5-digit numbers in each list (there are only a few large lists).

And everything that happens around is a disconnection and connection. I need a server that can do this quickly, like a free, free server. I mean, this is just text, so this should not be a big deal, right? But my application is structured around connecting a person to the next person who is connecting. Thus, if a whole group of people connects to about the same second, then I need a fast hosting server that can handle this in milisecond ... Will this even be a problem?

What exactly should I look for on the server if I just use memory for lists of numbers (without databases) and text traversal.

+5
source share
1 answer

First of all, this has nothing to do with webrtc . Basically you need a chat-server , a server that sends data from one client to another.
Secondly, the server type does not matter for the amount of RAM required to run it. The important thing is how many clients you will have at the same time. (to some extent, game servers obviously consume more RAM even without clients ).
Thirdly, more RAM does NOT mean faster processing. That is, if you do not fully use the available RAM , adding more will not do you any good. Obviously, when you exceed the available RAM , things start to slow down. Read more about this here

Now, with those who are out of the way, let's see what you need. You can make a very rough estimate by connecting several clients to the server and see how much RAM it uses. Check if the amount of RAM increases if these clients start calling each other and how much they increase. You now have the minimum and maximum amount of RAM for x clients . I would do this test with about 10 clients .

Now that you can make an assessment, calculate how much the minimum and maximum RAM for your expected user base. This will become an increasingly preferable thing from here, but I would at least double this amount, and then round to the nearest amount of RAM , which β€œmakes sense” (14.7 GB becomes 16 GB, 28.32 GB - 32 GB, etc. ....)

I will add from my own experience with webrtc about 1000-1500 simultaneous users, that 8 GB is quite simple. But it really depends on the number of users you expect.

On the node side, I highly recommend nodejs for the server. It is very easy to use, any programmer who knows javascript (so basically any programmer) can create a chat-server in nodejs in a day or two. Take a look at this open source webrtc server in nodejs

0
source

All Articles