# Number of producers and consumers

**URL:** <https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820>\
**Category:** mediasoup libraries\
**Created:** [October 1, 2020, 10:27am UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820 "2020-10-01T10:27:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mustafa](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@mustafa](https://mediasoup.discourse.group/u/mustafa)\
**Post date:** [October 1, 2020, 10:27am UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820/1 "2020-10-01T10:27:18Z")

</div>

Will the number of consumers and producers in one router affect the performance of the audio or video. Assume you have 70 users in a router each has two producers (audio / video) and 140 consumer.

---

<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:** [October 1, 2020, 10:32am UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820/2 "2020-10-01T10:32:20Z")

</div>

Yes it will.  
No I cannot give magic numbers.

---

<div class="post-metadata">

**Author:** ![mustafa](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@mustafa](https://mediasoup.discourse.group/u/mustafa)\
**Post date:** [October 1, 2020, 5:06pm UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820/3 "2020-10-01T17:06:12Z")

</div>

> [@ibc](#):
>
> Yes it will

You mean that there is a limitation in the number? How can we manage it?

---

<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:** [October 1, 2020, 5:12pm UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820/4 "2020-10-01T17:12:12Z")

</div>

Yes. For example, you cannot create 8 million Consumers into a Worker.

---

<div class="post-metadata">

**Author:** ![mustafa](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@mustafa](https://mediasoup.discourse.group/u/mustafa)\
**Post date:** [October 1, 2020, 5:22pm UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820/5 "2020-10-01T17:22:09Z")

</div>

No for sure. Can you give a an approximate capacity for the worker? I have an webinar application that allow a teacher to send audio, video and share screen, and students that may exceed 60 person that can produce audio and video. Some users complained that there is a problem in audio quality produced by teacher when the number of students increase. I don’t know if it is a mediasoup issue or something else, knowing that the number of routers in a worker may not exceed 10

---

<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:** [October 1, 2020, 5:43pm UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820/6 "2020-10-01T17:43:21Z")

</div>

Sorry, I cannot give numbers since those depend on many factors. There are a few ones in the Scalability section of the documentation. Anyway you have tools to debug things (some of them included in mediasoup).

---

<div class="post-metadata">

**Author:** ![kumar-ashish1](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/kumar-ashish1/32/772_2.png) [@kumar-ashish1](https://mediasoup.discourse.group/u/kumar-ashish1)\
**Post date:** [October 4, 2020, 1:00pm UTC](https://mediasoup.discourse.group/t/number-of-producers-and-consumers/1820/7 "2020-10-04T13:00:21Z")

</div>

A single router can handle over 500 transports so that if there is one host with 1 audio and 1 video then number of consumers will be approximate 250 approximate . so if you want to scale you app then use router.pipeToRouter().
