Add a new realm to an already running router

I have the crossbar router running in a docker instance, serving 5 different realms (multiple instances of the same Javascript application). ‘Bad things’ happen if the router is down when I want to send a message, so I monitor the connection and display a message when the connection is broken.

Is it possible to add another realm without restarting the docker container? Restarting the container causes the connection do drop, and my lost connection dialogs to be displayed which is not optimal for user experience. Maybe have the router re-read the config file? Send some command to the router to add a realm (hopefully updating the config file)?

I could change my app to have all instances use the same realm and have the message indicate which instance, but them the JS application needs to process a lot of messages that don’t apply to that instance.

I could run a separate instance of the router for each app, but I worry about the overhead of all the additional docker instances.

Any ideas? TIA!

My first instinct is to try and give the user a better “disconnected” experience. Ultimately, TCP connections can and do fail for many reasons (including “restart crossbar”). Can you simply re-connect and carry on? When you do connect, you probably have to synchronize some kind of state (whether it’s the “first” connection or a re-connection). Perhaps instead of a “you got disconnected” dialog, the application could choose to still function but display a “disconnected” icon/indication and synchronize changes when the connection is back up. Can you provide more details about what “bad things” happen? Can you use “retained events” so that disconnected clients come up in the right state?

I guess the wider context here is that any sort of “failover” scenario involving TCP will have to do re-connects. (Trying to do active failover on TCP connections alone already requires rather specialized hardware setup – and with crossbar there is a whole bunch of other state that would need to be transferred).