Load Balancing between Glacier2 routers

in Help Center
Ok, so we have Y clients and X different server processes which all need to communicate.
In an simple world they would just have proxies pointing directly at each other and everything would be swell.
However to protect the servers, and to simplify navigating through NATs etc. all outside connections are routed using a Glacier2 router.
All well and good, but it seems to me that this creates a sort of bottleneck as all traffic will routed back and forth through the Glacier2 router.
So how would I go about balancing load and handling faults in the routers. I assume that I can at the very least setup several routers and provide the clients with a list of possible endpoints for the routers, and then let them randomise their initial connection. But I was wondering if there was some other options I've overlooked, that might provide better balacing, migrations of sessions etc.
In an simple world they would just have proxies pointing directly at each other and everything would be swell.
However to protect the servers, and to simplify navigating through NATs etc. all outside connections are routed using a Glacier2 router.
All well and good, but it seems to me that this creates a sort of bottleneck as all traffic will routed back and forth through the Glacier2 router.
So how would I go about balancing load and handling faults in the routers. I assume that I can at the very least setup several routers and provide the clients with a list of possible endpoints for the routers, and then let them randomise their initial connection. But I was wondering if there was some other options I've overlooked, that might provide better balacing, migrations of sessions etc.
0
Comments
I don't think you overlooked any options. To balance the load of your clients, you should deploy multiple Glacier2 routers and you should provide your clients a proxy with multiple endpoints for the Glacier2 router.
Once a client has established a session with a given router, it will exclusively use this router. There's no mechanism to migrate a session to another router. If there's a fault in a router (software or hardware problem), all the sessions handled by the router will be lost and the client will need to re-establish a session with another router.
Benoit.
Just one more question then. My client also acts as a server in order to handle push-updates from the server. In order to do so it needs to have a router configured for its own adapter. Presumably this router has to be the same router as the outgoing router set up for the clients communicator. But, if i understand correctly, if a proxy specifies multiple endpoints the actual endpoint we use is selected at random, so how do I make sure the adapter and the communicator use the same router endpoint ? Should I avoid initialising them through configuration properties, and do it in code instead?
I don't know if that was all clear. In any case you've answered my main question, so i think I can figure out the rest from here.
Yes, but doesn't it need to have an adapter specific router setup to enable callbacks ?
Like in your callback demo example where you setup both
Ice.Default.Router=Glacier2/router:ssl -p 10005
and
Callback.Client.Router=Glacier2/router:ssl -p 10005
It's these router endpoints I was concerned about.
With Glacier2, your code usually looks something like this:
Of course you can also use configuration properties, but with the code above, you have to specify the router proxy only once.