Separate webrtc recvTransport for each (audio/video) consumer pairs

First of all thank you very much for this amazing library. I have done several projects with this and they worked perfectly. At the moment Im doing a simple group call application with around 12 users per sessions and with audio/video enabled. Now I need to do the horizontal scalling part.

For the scaling part what I planed is to create separate recvTransports for every audio/video consumer pair of a user in the room.

As an example , if there are 3 users named A, B, and C. When A starts publishing I create a sendTransport and produce audio and video using that transport. Then once A needs to consume from B user I create a recvTransport and use that transport to consume B user streams. Then when A user need to consume from C user again I create a recvTransort and use it to consume from C user. I thought to do this because when user A need to consume from the user C the server might be scalled horizontally and will not be able use the previous recvTransport created. So for a 12 user video call there will be 12 recvTransports for a user.

My problems are,
Is this a good practice?
Is this plan will impact user performance?
Is there any other proper way to address the horizontal scaling problem?

You just need a single recvTransport for consuming all the remote streams.

Thanks for the quick reply. Dont we need separate transports for separate instances. like if there are 3 linux instances and consumers are distributed in those 3 then can we use the same recvTransport? because if we create a new consumer in other instance then maybe they are overloaded with consumer limit.

Not sure if I follow. If you client is consuming from different servers obviously you need different recvTransports to consume over them.

1 Like