Hi, I’ve finished developing my application with mediasoup and now it’s time to put it into production.
I’ve set up an architecture that allows me to expand and load new servers if the number of users starts to increase too much. Although it works, this process is not yet automated. That’s where my question arises:
In your experience, are there any statistics related to the number of users vs a minimum server configuration vs internet bandwidth? Obviously I know that other factors play a part, but in this case it would be an approximate average.
for example: 1 linux server (ubuntu), with 2GB of ram and 10GB of bandwidth can support an average of X users
If anyone can share their experiences, I’d be grateful.
That’s not an easy answer to provide there’s many reasons why…
How your systems scale and pre-allocate space for piping locally/remotely.
Algorithm on scaling can limit the user count.
The up-to bitrate per broadcast and their viewers.
How hard you want to drive the CPUs before adding to the nest.
I can say a good rule of thumb is for every 1vCore @ 2GB ram you want 250Mb/s up/down link. You can play around and find your maximum and determine. A tip would be trial a weight system and just spawn more workers if it feels off and destroy some if server is overloaded. Setup a system to move users broadcasts around on the go in sub second speed.
For the bandwidth question, each user on the platform uses up to 300KB/s video and 1-80KB/s audio, your use may vary but know we’re cooking at a steady 40-60MB/s transmit with scaling/etc involved assuming 70-90% usage of the server; server would be a 4vCore 8Gb Ram, 1Gbp/s up/down networking. I run 11 media servers and it’s consistent across them all at full load. So if you go beyond that bitrate watch out I eat TBs rather quickly for egress!
To sum it all up, you’re stuck learning on your own or paying someone for their knowledge this is not an easy gig at all, trust.