I use the webrtc.io lib in my app but I have a problem with load balancing because all socket connection are saved in a global array
//Array to store connections
rtc.sockets = [];
manager.on('connection', function(socket) {
...
rtc.sockets.push(socket);
...
});
Link to the Lib: https://github.com/webRTC/webRTC.io/blob/master/lib/webrtc.io.js
I would like to start my webrtc.io server app multiple times, so storing the Socketobjects like this is not a option. I think I need a database backend but is this even possible?
I don't think you want to store socket connections in the database for load balancing. Rather, you would want to redirect clients to different servers somehow, and have them establish socket connections directly to these servers.