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

**URL:** <https://mediasoup.discourse.group/t/separate-webrtc-recvtransport-for-each-audio-video-consumer-pairs/2089>\
**Category:** Deployment & Scalability\
**Created:** [December 1, 2020, 9:09pm UTC](https://mediasoup.discourse.group/t/separate-webrtc-recvtransport-for-each-audio-video-consumer-pairs/2089 "2020-12-01T21:09:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chamath](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/chamath/32/680_2.png) [@chamath](https://mediasoup.discourse.group/u/chamath)\
**Post date:** [December 1, 2020, 9:09pm UTC](https://mediasoup.discourse.group/t/separate-webrtc-recvtransport-for-each-audio-video-consumer-pairs/2089/1 "2020-12-01T21:09:54Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [December 1, 2020, 9:17pm UTC](https://mediasoup.discourse.group/t/separate-webrtc-recvtransport-for-each-audio-video-consumer-pairs/2089/2 "2020-12-01T21:17:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chamath](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/chamath/32/680_2.png) [@chamath](https://mediasoup.discourse.group/u/chamath)\
**Post date:** [December 2, 2020, 10:15am UTC](https://mediasoup.discourse.group/t/separate-webrtc-recvtransport-for-each-audio-video-consumer-pairs/2089/3 "2020-12-02T10:15:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [December 2, 2020, 10:51am UTC](https://mediasoup.discourse.group/t/separate-webrtc-recvtransport-for-each-audio-video-consumer-pairs/2089/4 "2020-12-02T10:51:29Z")

</div>

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