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.
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.
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.