a good starting point ?

I want to know a few starting points for my further research:

  1. Can a single transport be used for publishing both audio and video tracks, or should we use separate transports for audio and video in a single media stream containing both?

  2. I want to create an application that can handle a maximum of 9 users producing both audio and video concurrently, with the potential for an audience of over 50,000. Anyone from the audience can join for an audio/video call, but at max, there will be only 9 users for audio/video streams. What should be the starting point? Should I create a single router for every user and pipe it, or use some routers for some users and others for the rest? Are there any restrictions on the number of routers we can create under the 500 consumer limit of a worker?

  1. You can use both of the ways you mentioned but producing all the stuff on single transport is best approach. I use separate transport for each producing track to keep scalability simple on server side.

  2. Number of routers is not an issue, it is the number of workers that matter so you can have 1 router in 1 worker and it will be able to handle 500 consumer for example. So it is the number of workers which is important and not the number of routers. And how many routers you create per worker is up to you. No need to create router, worker for each user, what you can do is that for each room you can create a worker and a router inside it once that worker’s capacity is about to get full then you can create another worker and another router and utilise it and do the piping between the routers of these 2 workers and so on.

Just to make sure that you are calculating the load properly: if there are max 9 video and audio producers then at max that will be 18 producers and if 100 people are watching that live stream then each one of the watching users will be consuming around 18 producers and for 100 watching users that will be around 1800 consumers.

are there any default function present to check the load on worker and load on router ?

I don’t think so, as per your cpu you can test and get how many producer/consumers single worker can handle lets say 500 and based upon the active producers/consumers on that worker you can calculate the current load of that worker.

You can also get the load from the process of the worker using some shell command or may be third party node package. You can get the process id from worker. But that percentage can have ups and downs because of all the things happening in the OS. I am doing the first method I described above.

Hello Sir, If you want I can help you build your solution, contact me at mohammedik2005@hotmail.com