It is possible to re-attach Transports / Producers / Consumers from one router to another?

I am thinking about scaling… so the first question appears to be - it is possible to reuse all the created transports, producers, consumers on the server side, but just attach / move to another router?

Example: lets assume we have send/recv transports for Bob on a server side. Bob had some Producers in send and some Consumers in recv. Now, Bob moves to another room with the same router config… why to create two transports again? Would be more effective to switch them to a new router (not forgetting to clear / remove old Producers and Consumers).

Is it possible to somehow do this or the core understanding is wrong how things should work?

More general question: how can I reuse Transports, Producers, Consumers?

Thanks!

The problem is that you are assuming that your “app room” must be associated to a specific mediasoup Router. The fact is that we will probably remove Router in mediasoup v4 to avoid those assumptions. And no, there is no api to move a Producer to another Trabsport or a Transport to another Router. We won’t add it but will reconsider the existence of Router as said before.

Please do, I literally only use a single router per worker and organize my room logic and all sorts for scale. Now I would consider all use cases, but I would agree or at least making it private API slowly during this versioning so it can be used but others can switch over.

There is a confusion here. The fact that we remove Router doesn’t mean that you will be able to magically move a Transport into another Worker. That won’t be possible since each Worker is a different process and has its own memory and state.

Yeah, no confusion I absolutely agree with the removal of Router.

Can you describe shortly, please, what should we expect in next versions that won’t have Router?

And my second question is - am I right that one router can process any type of Producers and Consumers? There is no tight connection between Producers options and a Router?

Thanks.

A Router is provided with a set of codecs so Producers can only use those codecs. Regarding next version nothing is decided regarding Routers.