Archived

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

How to setup server cluster

I want to be able to use ICE with cluster of servers, so that I can transparently add or remove servers from the cluster as required, according to load. The clients should not be aware of any change.

What is the best to do this with ICE?

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Currently the easiest way to do this is at the application level through the use of an interface to get a proxy of a replica or a proxy containing the endpoints of multiple replicas. The implementation of this interface would take care of keeping track of the replicas and the load balancing.

    In the near future, IceGrid will provide support for replication with indirect proxies which will allow you to do just that. Your client will use an indirect proxy (a proxy without endpoint information). The endpoints of this proxy will be resolved at runtime by the IceGrid service. See the second issue of the Ice newsletter for more information on IceGrid!

    Benoit.
  • benoit
    benoit Rennes, France
    Btw, I should also note that IcePack also provides a simple interface to discover a service, the IcePack::Query interface (see slice/IcePack/Query.ice). You can use the IcePack::Query::findObjectByType method to retrieve a proxy for an object with a given type. If several servers registered an object with this type (using the IcePack deployment mechanism for example), IcePack will return a randomly selected proxy.

    Benoit.