Hello guys, I am trying to build a new web application for social streaming and, in my opinion, Mediasoup is a great solution for that. Could someone please help me with the next questions:
How many people can see a video with one to many streaming ? (I have 1k-5k people online on one stream)
I know 1 router can have only 500 consumers. Can I solve my task with horizontal scaling and separate consumers between workers?
Maybe someone has a diagram of how 1 large room works in a few instances? Or maybe a strategy to separate large room between servers?
This depends on server’s core ability and network (less likely memory), assuming both audio/video it can be double the requirements.
You can definitely further feed your producer to more servers to be consumed from making the numbers you expect. I generally have within a room setting 1 -8+ consumer servers used.
I have made a post on scaling and it may help, I use a weight system so I never over-load my producing/consuming abilities which tends to be the hardest part about all this.
You have many options to scale.
I would opt for HLS as it’s easiest to send to hundred/thousands of viewers. This is only if you can accept the transcoding process and give delay to users 5-30 seconds.
Link please to this post, its really needed
I have been at this for months, trialing different configurations and it wasn’t easy but I think I can explain this for you guys nicely. Here’s my numbers though first and just scale them up!
Bitrate: 10000000 (I/O)
Cores: 2 (1 for producer 1 for consumer)
1 core = 12 viewers (6 broadcasts)
4 core = 24 viewers (12 broadcasts)
User Weight for Viewers (Bitrate had affected these results more than CPU could):
12 viewers = 1 weight
24 viewers = 2 weight
Check this out, I go into how I do it but no code is shown it’d easier to explain what I am doing and you guys can code something alike or EVEN BETTER! I use many media-servers 7x4vcore machines 1gbp/s networks