Scalability in AWS server

How do I make mediasoup scalable so that it can support more than 500 users. Currently it is supporting upto 500 users on AWS dual core server. Do I have to add extra processors and extra code for making it scalable so that it can support unlimited users?

There are no “users” in mediasoup. Everything about scalability is explained in the documentation:

Hi Vimal,

For scaling across mediasoup workers, you can user the router.pipeToRouter Api in the mediasoup. But there will be a limit to the worker that you can have(for example, a four core machine can have 4 workers and eventually in can have a maximum of around 2000 consumers).

You can also scale your application across different physical hosts on which mediasoup would be running. For this you need to have the knowledge of PipeTransport() api in mediasoup, also you need to have some mechanism to communicate the hosts with each other so that, one host can pipe the incoming stream to other hosts using the createPipeTransport() api of the mediasoup.

For my use case i have used redis pub sub mechanism for the servers to communicate with each other. and it was possible to pipe the streams from one host to another.

2 Likes