how to keep workers, routers, transports processes alive after node server restart?

Is there any way I can keep these mediasoup processes active after node server restart?

If yes then how will I get back these worker, router, transport objects from these processes?

EDIT:
To sum it all up:

Of course not.

Ok, one way i can think of is that whenever server gets restart then upon restart i will initiate the mediasoup process for all the rooms that were active before server restart and notify apps to connect to room again.

Is there any other way in your point of view?

Let it crash, let it destroy all the data and start new.

During the crash however you should generate a new media server for users if you have one available as the server that just went down may take several minutes to return and in that time we could have one that’s alive already. :slight_smile:

Besides, if you got attacked with that type of setup, the room of users will be mad.

Ok thanks, but the better approach will be that we have some way in mediasoup to detach mediasoup processes from node server that way mediasoup processes will not get killed and after node restart we should have an option to construct the worker objects from their process ids.

Puppeteer have this functionality, it was quite useful for me.

Use this approach to accomplish this functionality:

This seems the best approach but is not supported at the moment:

Do check comments from @CosmosisT: