# Node JS - Mediasoup App Scaling Issue

**URL:** <https://mediasoup.discourse.group/t/node-js-mediasoup-app-scaling-issue/4676>\
**Category:** Deployment & Scalability\
**Created:** [November 6, 2022, 4:50am UTC](https://mediasoup.discourse.group/t/node-js-mediasoup-app-scaling-issue/4676 "2022-11-06T04:50:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shivesh](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Shivesh](https://mediasoup.discourse.group/u/Shivesh)\
**Post date:** [November 6, 2022, 4:50am UTC](https://mediasoup.discourse.group/t/node-js-mediasoup-app-scaling-issue/4676/1 "2022-11-06T04:50:25Z")

</div>

Hi There,

I am facing scalability issue on my nodejs-mediasoup application. Its able to work properly for 15-18 concurrent meetings with 2 participants in each meeting. But when we increase the load, participants start getting dropped, server becomes unresponsive, index page loading also starts taking 8-10 seconds.

My infrastructure components are way undercontrol, CPU/Memory is never going up 10%, I/O is 4MB/Sec, Bandwidth is 50M/Sec

Need your help to understand where I am going wrong. Is it Node js server issue where it has only 1 worker thread, but my understanding is as long as we are spawning Mediasoup worker thread upto the number of CPUs , it should be able scale.

Please give me some pointers to proceed.

---

<div class="post-metadata">

**Author:** ![zaidiqbal](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/zaidiqbal/32/1498_2.png) [@zaidiqbal](https://mediasoup.discourse.group/u/zaidiqbal)\
**Post date:** [November 6, 2022, 7:52am UTC](https://mediasoup.discourse.group/t/node-js-mediasoup-app-scaling-issue/4676/2 "2022-11-06T07:52:04Z")

</div>

You need to check how much cpu your nodejs server process is using? You are not using clustering so you are on single core and node process might be overloading the core capacity, if you are doing something heavy, causing all these issues.

Also check for the mediasoup workers whether you are utilising them properly.

Share your cpu specs as well.

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [November 6, 2022, 1:06pm UTC](https://mediasoup.discourse.group/t/node-js-mediasoup-app-scaling-issue/4676/3 "2022-11-06T13:06:19Z")

</div>

I agree with Zaid.

I think you cap-sized your worker and aren’t piping correctly to fan usage. So you could have many core configuration but aren’t routing correctly and over-use the thread in question.

---

<div class="post-metadata">

**Author:** ![BronzedBroth](https://avatars.discourse-cdn.com/v4/letter/b/ad7895/32.png) [@BronzedBroth](https://mediasoup.discourse.group/u/BronzedBroth)\
**Post date:** [November 6, 2022, 1:15pm UTC](https://mediasoup.discourse.group/t/node-js-mediasoup-app-scaling-issue/4676/4 "2022-11-06T13:15:16Z")

</div>

I would be curious to know who your host is as well if you perform trace route who is their ISP and their quality across the world. 🙂
