Anyone done server-to-server router pipe impl yet?


It’s also perfectly possible to inter-communicate mediasoup routers running in different physical hosts. However, since mediasoup does not provide any signaling protocol, it’s up to the application to implement the required information exchange to accomplish with that goal. As a good reference, in order to pipe a producer into a router in a different host, the application should implement something similar to what the router.pipeToRouter() method already does, but taking into account that in this case both routers are not co-located in the same host so network signaling is needed.

I am about to tackle this task for my use case, but before I started I was wondering if anyone had done this before? I am looking for any example code or any quirks. At first glance it doesn’t seem pipeToRouter impl is that difficult to signal params back and forth on…will report back if I hit snags or have code to share.

If you search in this forum for pipeToRouter you’ll already get plenty of entries.

There are lots of corner cases to handle :frowning:
Here’s one I recently worked on: lets say one of the nodes goes down. When you bring it back up, you need to clear out all the previous producers/consumers and close the remote pipeTransports.

1 Like

It’s up to you how to monitor whether nodes are up and down. That’s inter-server communication stuff. Not related to mediasoup.