Archived

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

ICE replication question

I have ICE enviorment configured this way - I have two nodes. Node 1 is the master and node2 is configured as slave. Ice.Default.Locator=EclipseGrid/Locator:tcp -p 4061 -h <node1>:tcp -p 4061 -h <node2>
Node 1 has my application service (say MyApplication) configured which also has adapter.
Node2 has IceStorm service (MyApplication:IceStorm) which has the topicManager used by MyApplication service. I am configuring this application from IceGrid admin and deploying the code using icepatch2. I am not using deployment descriptor XML for my deployment.

I would like to know how to configure these Nodes in replication mode. I want to do failover testing against these nodes.

Also, I have couple of questions -
1. Will I need to deploy MyApplication on both nodes? As I understand the Ice.Default.Locator has both the nodes which are already configured as master and slave. so do I still need to deploy this application on both nodes seperately? Or on just one node?

2. I could see some ways of configuring the replication using deployment descriptor xml in ICE manual documents. But I am not using deployment descriptors for deployment. Could you guide the steps requried to be configured from Icegrid admin for the same?

3. I had tried to configure one Replica group from icegridadmin and configured the same replica group name to adapter configuration properties. But I can not see the replica group configurations on "Live deployment" tab in icegrid admin. So even though I can start Myapplication service, I can not monitor what endpoints this replica group is using for replication. And also not able to find out on which node this replica group is running.

Comments

  • benoit
    benoit Rennes, France
    1. Will I need to deploy MyApplication on both nodes? As I understand the Ice.Default.Locator has both the nodes which are already configured as master and slave. so do I still need to deploy this application on both nodes seperately? Or on just one node?

    The Ice.Default.Locator property has no effect on the replication of your application. It is just a configuration that specifies where the IceGrid locator can be found, in your case they can be found at two endpoints: tcp -p 4061 -h <node1> and tcp -p 4061 -h <node2>.

    So yes, you need to deploy your application server on both IceGrid nodes if you want it to run on both nodes.
    2. I could see some ways of configuring the replication using deployment descriptor xml in ICE manual documents. But I am not using deployment descriptors for deployment. Could you guide the steps requried to be configured from Icegrid admin for the same?

    I recommend to first use an XML descriptor and see the resulting configuration for the application in the IceGridGUI. You could for example try to load one of the IceGrid demo included in the cpp/demo/IceGrid directory (both simple and replication demo provide descriptors using replication). You can then checkout how the demo is setup with the IceGridGUI.
    3. I had tried to configure one Replica group from icegridadmin and configured the same replica group name to adapter configuration properties. But I can not see the replica group configurations on "Live deployment" tab in icegrid admin. So even though I can start Myapplication service, I can not monitor what endpoints this replica group is using for replication. And also not able to find out on which node this replica group is running.

    Yes, the replica groups don't show up in the live deployment tab. You have to check for each individual object adapter member of the replica group to figure out what endpoints can potentially be returned for the replica group.

    Cheers,
    Benoit.
  • Thanks for the reply.

    I think I am getting confused here. What I want to implement is failover for my service over two nodes - node1 and node2.
    benoit wrote: »
    So yes, you need to deploy your application server on both IceGrid nodes if you want it to run on both nodes.
    This type of configuration is required for failover or for load -balancing? I do not want to do load balancing for now.

    Also, I came across this "With respect to IceStorm fail-over - recommend to build a set of identical IceStorm replicas" -for failover in one of the old forums. This seems to be very old post. Is it still required? or does the Highly available Icestorm has solved this ?

    I have one Icestorm service(MyApplication::IceStorm) for my application. When I start that, I could see the published endpoints as - tcp -h node2 -p 60393:tcp -h node2 -p 60393:tcp -h node2 -p 60393.
    Also I noticed that - this icesotrom service(MyApplication::IceStorm) gets automatically started whenever there is any message to be published, in case if it was not active before.

    Replica group configurations have a property - load balancing policy. So replica group is required to be configured only in case of load balancing scenarios?

    Could you please guide on the steps required to set up the failover from IceGridGUI for an application which has
    - IceStorm service
    - object adapter
  • Attached is the exported deployment descriptor XML from IcegridGUI for my test service. Which I would like to configure for failover.
  • benoit
    benoit Rennes, France
    Hi,

    It is not clear to me what you're trying to achieve. Can you detail exactly which services you want to run on the 2 nodes?

    Are you looking for a setup where one node acts as a "backup" node of a "master" node and which uses IceGrid replication to automatically fail over the backup node when the master node is unavailable?

    If that's the case, you should look into using the "Ordered" load balancing policy for the IceGrid replica groups. With this policy, the IceGrid locator will always return the endpoints of the replicas in a specified order and if a replica is unavailable, it returns the endpoints of the next replica.

    To answer your question, yes you need to deploy your service on both nodes even if you're only interested in a "fail-over" scenario. If you use the Ordered load balancing policy for your service replica group, the service running on Node A will be always used until it becomes unreachable in which case the service running on Node B will be used.

    For setting up IceStorm to be highly available, you should take a look at the setup of the C++ demo/IceGrid/replicated demo included with your Ice distribution.

    Cheers,
    Benoit.