Transport from one router to another

Hello everyone, in our case we have broadcast many-to-many, for example there are 5 broadcasters and 100 watchers. I have to know count of all users, cause maximum 500 consumers per worker. In my example I have ~ 1000 consumers. It’s brilliant If I know how many participants will be in my session.
What should I do when I don’t know how many participant will be involved in my session. I show what I mean.
In my example 5 broadcasters, 100watchers
worker 1 includes 500consumers
worker 2 includes 500consumers
But If 1 more broadcaster want to join them
6 broadcasters, 100watchers
worker 1 includes 600consumers
worker 2 includes 600consumers
If one broadcaster join this session, in our worker count of consumers will be overcome and it’s made problem in session.
I need tool which help me allocation transports dynamically among workers
Thanks a lot for all recommendations!

It’s you the one who is coding the logic to create transports and consumers in a router or another. So your app should take care of it and use pipeToRouter() when there are more than 500.

No magic tool for this.

Ok, I see here transport contains consumers, router contains transports and worker contains routers. If value of broadcaster or producers increases, value of consumers will increase in transport also. Transport bind with exact router and router bind worker. That means count of consumers are overcome limit in one worker, 'cause transport bind router(router bind worker). I see here two ways: for every consumer create different transport or somehow moving transport to another router. And you recommend me first way, when I create transport for ‘overcome’ consumers, am I right?

This is incorrect. You create the Consumer in the Transport you desire, so if you are broadcasting you create a Transport for each receiver endpoint and a Consumer (or two Consumers for audio and video) in that Transport.

There is nothing to change in mediasoup design here. No, you cannot move Transports into a different Router. But you can decide in which Router to create those Transports.

1 Like