Archived

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

ICE support for fail-over (not load balancing)

For an application that we are writing we are trying to keep our server side components stateless. However it is not feasible for one of them.

This component has to keep a cache of info that is stored in a database in order to make effective decisions. Any updates to the info in the cache get written through to the database.

If we were looking at having more than one instance of this servant running at one time we would need to keep the caches "in sync" which is a hastle. One server should easily be sufficient to service the demands on the system for a considerable time yet.

However we need to handle the situation where the servant dies for whatever reason (bug, crash or hardware failure). We'd like any such failures to be invisible to the client application and have the middleware be able to detect when trying to establish a connection that the server is unavailable and start another one on a different machine (but we need to make sure that there is only one running).

I was looking into IcePack as we currently have 2.1.2, but the new IceGrid seems to clean up the configuration somewhat, so we may end up using that instead even though we are not designing a "grid application". I have read the IceGrid intro in Connections issue 9 but thad didn't cover the fail over type situation that we are looking for.

Is there a facility in ICE for this?

Edit: sig added (I hope)

Comments

  • benoit
    benoit Rennes, France
    Hi and welcome to the forums! We'll be happy to answer your question if you provide more information on your project and company/organization in your signature. See [thread=1697]this thread[/thread] for more information!

    Thanks,

    Benoit.
  • Well editing didn't add the sig.

    This should :)
  • benoit
    benoit Rennes, France
    Hi Tim,

    Yes, it should ;) To answer your question, I'm afraid it's currently not possible to configure IceGrid to provide fail-over on another server instance when the main server crashes. There's also no other facility providing this feature. I agree that this would be a useful feature, especially for servers whose state can easily be retrieved from another service (a database). If you have a commercial need for this, we could look into adding this to IceGrid. Please contact us at info@zeroc.com if you would like to talk some more about it.

    Cheers,
    Benoit.
  • Thanks Benoit.

    We'll need to think a bit more on this. But I have a feeling that we'll end up with a "monitor" that will make sure that it stays running, and manually fire up another if the first fails.

    IcePack has the facility to start and stop executables on given servers doesn't it? Couldn't we hook into that?

    Given that IceGrid is listed as a replacement for IcePack, does this also provide that facility?

    Tim
  • benoit
    benoit Rennes, France
    Yes, both IcePack and IceGrid allow you to start and stop servers, either programatically with the IceGrid::Admin interface or with the admin tools. IceGrid also provides observer interfaces that allow you to monitor the state of the deployed IceGrid nodes and servers.

    You could probably use these APIs to implement some sort of fail-over but I suspect it won't be as efficient and transparent for clients as a mechanism built-in the IceGrid locator service.

    Benoit.