This forum has been archived. Please start a new discussion on GitHub.

load balancing and routing


I read the about load balance. The client must know each server's locations and select server randomly. The load balance is achieve by the client. But in most cases, the client only know the Locator. Could Locator provide any load balance policy?

In tuxedo , the request can use FML format, and can be routed by data in FML. For example if I define a id field in FML, I can control requests include id<1000 to one server and id>1000 to another. This can be done by configuration in deployment time, it needs not change the client program. Could Ice do this?

Best Regards


  • benoit
    benoit Rennes, France
    The IcePack registry provides the IcePack::Query interface to find a particular service. Your client can use this interface to obtain a service which is registered with the registry. Take a look at the Ice-2.1.0/demo/IcePack/simple demo. It demonstrates the use of the IcePack::Query::findObjectByType method. Note that the object returned by this method is randomly selected.

    IcePack does not provide the Tuxedo functionality you describe. However, it wouldn't be difficult to implement this yourself. Your client could identify itself and query a registry service which would take care of returning the right object (depending on the identity of your client). This service could use the IcePack registry to discover all the available services.