A room with 100 participants

Hi Team,

In the link of documentation about scalability, it is clearly written that in a room with 4 peers the total number of consumers is 4*6(each peer receiving other 3 peers audio and video tracks)=24 consumers. It is also mentioned that, a mediasoup c++ subprocess running on a cpu core can handle nearly 500 consumers.

Do you think is it a good idea to have a room with 100 peers at the same time all of them sending the streams and receiving the streams of each other? Now this takes me to a number of around 100*198=19800 consumers(please correct me if the math is wrong here). And to handle these many consumers i would require a really high configuration machine may be with 50 cores and what not.

And mediasoup being a SFU in itself is forwarding the streams and it may be possible that the client browser could not have the capability to handle those many streams together. How this could have an impact on client’s bandwidth usage and the cpu usage?

1 Like

You don’e want to receive 100 videos in client side, so use consumer.pause/resume() in server side to avoid that.

Hi,

Are you suggesting that i should not send all the consumers to each client? Even if i do consumer.pause/resume() what if there is a case where i would want to see every one(here only the videos not the audio tracks, since it is not a good idea to have 100 people talking together). How would mediasoup server behave in this case? And what should be the configuration of the server that i should use to support such a usecase?

I don’t think that’s possible, the decoding CPU usage on the client side would make the it impossible to use. Even zoom desktop app limits to a max of 50 at a time. Not even mentioning bandwidth usage.

That said, you would have to scale mediasoup horizontally. see mediasoup :: Scalability and other posts in the forum.

Hi Oscar,

You are right about scaling mediasoup horizontally. Even doing so, piping all the 100 participants producers to other mediasoup servers could make things real complex. Coz, participant 1 needs to consume 99 video producers and 99 audio producers. And all these producers need to be present on the same router where i am trying to consume them and the router is created on worker and the worker has a limitation of number of consumers it can handle(please correct me if i am wrong). I am not sure how much feasible that would be.

I am more worried about client side, i dont know if any of the webrtc supported browser could handle those many videos at once. And the amount of bandwidth requirement at the client side needs to be very huge.

Assume you cannot receive 100 videos in the browser or mobile.

Thanks for the response @ibc.

Could you please suggest the number of max participants that i can have in a room at the same time, considering all consumers and producers are in the resume state.

I know that i should check that by myself, may be by increasing the number of participants in incremental steps of 5. But you guys are experts here and your advice could save me some time.

I cannot give the exact response you are looking for. But you can check this study: mediasoup :: Publications

We are here to help, not to provide our professional expertise for free :wink:

1 Like

I don’t know what the application of this room is although assuming it’s a regular conference I don’t think you need to see everyone in best quality all the time on your screen. Probably there are just some people that are active and need to be shown in good quality.
The others could be paused or have a reduced quality. I assume that the browser would be able to handle the decoding of more streams if their quality is low. So configuring simulcast could be a good solution while upgrading the quality of some streams.