|
|
|
|||||
|
Load Balancing between Glacier2 routers
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.
__________________
Nis Haller Baggesen Lead Programmer Company: Runestone Game Development (www.runestone.dk) Project: Seed (MMORPG) (www.seedthegame.com) |
|
|||||
|
Ok. At least my intuition was right.
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.
__________________
Nis Haller Baggesen Lead Programmer Company: Runestone Game Development (www.runestone.dk) Project: Seed (MMORPG) (www.seedthegame.com) |
|
||||||
|
If you use a router, then your object adapter doesn't need to be configured with any endpoints. Instead, the object adapter will use the connection that has been established from the client to the router to dispatch requests (i.e., the connections are used bi-directional).
|
|
|||||
|
Quote:
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.
__________________
Nis Haller Baggesen Lead Programmer Company: Runestone Game Development (www.runestone.dk) Project: Seed (MMORPG) (www.seedthegame.com) |
|
||||||
|
Yes, this is correct. I thought you meant regular endpoints.
With Glacier2, your code usually looks something like this: Code:
Ice::RouterPrx routerBase = communicator()->getDefaultRouter();
if(!routerBase)
{
// Error message that says that Ice.Default.Router is not set
}
Glacier2::RouterPrx router = Glacier2::RouterPrx::checkedCast(routerBase);
if(!router)
{
// Error message that says that the configured router is not a Glacier2 router
}
// Establish session with the Glacier2 router (see chat demo in Connections)
Ice::ObjectAdapterPtr adapter = ... ; // Create OA (no endpoints required)
adapter->addRouter(router); // Add the router to the OA
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Glacier2, IceGrid, and Load Balancing | seth | Help Center | 15 | 11-06-2006 12:03 PM |
| About load balancing | ganzuoni | Comments | 3 | 12-07-2005 08:15 AM |
| Client connecting to multiple glacier2 routers | feline | Help Center | 1 | 04-21-2005 06:11 AM |
| Client with several Glacier2 routers | GJ Giezeman | Help Center | 1 | 04-01-2005 08:47 AM |
| Load Balancing | ganzuoni | Help Center | 8 | 06-20-2003 07:07 PM |