Mediasoup Deployment Downtime

Mediasoup needs to be stored everything in router.js inside the application server. Let’s say I have 10 workers. and I need to update them using my docker-compose file. but the problem is as soon as any of the workers gets rebooted. everything is lost. any methods or suggestions to persist them. since I read some threads routers can’t be stored in the database. but I think as soon as the server reboots it will lost its data related to transport and everything. and each client which is connected to producer will get lost.
and there is no way to reconnect

What do you want to store in a database, UDP sockets?

It is up to your application logic to decide how to reconnect, where to reconnect and when to do so. Ideally you’d make clients reconnect before you shut down the old instance. But this is not mediasoup’s job.

I am not sure what to store. but I feel that something needs to be provided to persist mediasoup data.
but you put me in a good direction . i should create a event for reconnection to transfer the voice server instance for client.

Most of mediasoup’s state is ephemeral, so you don’t really store that, instead you create another instance and destroy the old one.

2 Likes

Yes now i am exploring different methods about zero down time for mediasoup. will post here if someone wants to approach same.