Home Comments

About load balancing

ganzuoniganzuoni Member Guido AnzuoniOrganization: IndividualProject: No specific project ✭✭
I have read with a lot of interest the docs about new IceGrid features,
that, as usual, are really great !!
But checking (Java, easier for me ;) ) source code to see what happens
on the client side, it seems that endpoints retrieved by locator are
always cached at Communicator level.
This means that on a middle tier, acting as multiple concurrent clients,
all the invocations should go to the same server.
In a usage patter like the following, for each request processed on the
middle tier (e.g. a servlet):
......
// select target server identity
ObjectPrx prx = communicator.stringToProxy(id);
//invoke operation on proxy
....

The endpoints attached to the Reference used by proxy prx will
never change because of the cache.
Am I wrong ?
Maybe there should be a way to trigger locator.findObjectById()
each time a proxy construction is requested, so that load balancing
strategies can take place.


Guido

Comments

  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    Please see this post regarding our support policy here in these forums:

    http://www.zeroc.com/vbulletin/showthread.php?t=1697
  • ganzuoniganzuoni Member Guido AnzuoniOrganization: IndividualProject: No specific project ✭✭
    marc wrote:
    Please see this post regarding our support policy here in these forums:

    http://www.zeroc.com/vbulletin/showthread.php?t=1697
    OK, done.
    I have read latest Connections' article on IceGrid (and the editorial, great as
    usual !!!), but I stll wonder if load balancing is in effect if,
    in the same client, multiple threads invoke operations on a balanced server.

    Guido.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    You're right. Once the endpoints for an indirect proxy are cached, the Ice runtime will always use these endpoints for invocations on the proxy and it won't contact again the location service unless the endpoints become invalid (the connection can't be established anymore). Improving this is on our TODO list (we plan to add some configuration to allow to configure the lifetime of the locator cache entries). If you have a commercial need for this feature, we could move this at the top of our TODO list, please contact us at [email protected] if that's the case!

    Benoit.
Sign In or Register to comment.