Nowadays I am looking into mediasoup internals to figure out how to run mediasoup at best, for scalability deploy for cloud.
I know that mediasoup is nodejs module and c++ workers. And they use interprocess communication. My problem starts here. nodejs server also handles signalling from participants and managing workers also (create router, create producer, audiolevel observing etc…)
So, after a number of participants, nodejs server’s clients’ side signalling gets heavy ( A case users starts to chat heavily over signalling channel over nodejs server).
I am looking for a way to handle this. One radical option is, writing a c++ rest server in front of worker and consuming events from nodejs server over tcp/ip socket. Actually this will be replacement of channel comm within mediasoup nodejs side and worker side . As you see, this changes the core mechanism which is interprocess communication. With this, I am planning to scale only rest servers which are working workingon the same process.
Beside this, moving the rest server in front of the nodejs module is another option. With this, signalling and chat messages will be in another process and scalability will mean scaling nodejs+workers .
I would like to ask you that did you think such kind of architecture like the first option before planning mediasoup architecture? What are drawbacks beside implemention time and test of course.
I would be glad to discuss this with you…
If someting needs to be clarified more, please ask.