Hi John,

Originally Posted by
jharriot
Hi,
Configuration:
------------------
Ice: version 3.3.1
OS: Win XP, RHEL 5.2
Query 1:
-----------
I have configured 7 PCs with one set as MASTER and the others as REPLICAs.
Master = 192.168.1.10
Replica1 = 192.168.1.20
Replica2 = 192.168.1.30
...
Replica6 = 192.168.1.70
I have set each IceGrid Node config file Default Locator with all 7 TCP endpoints.
e.g. Ice.Default.Locator=DemoIceGrid/Locator:tcp -h 192.168.1.10 -p 4061:tcp -h 192.168.1.20 -p 4061 ....etc
I guess I should also add timeouts for each endpoint?
Yes, otherwise without timeouts the Ice invocations might block for quite sometime before failing (depending on the network and the reasons why the server endpoint doesn't respond).
I'm not quite sure what values I should specify for:
IceGrid.Registry.Client.Endpoints
IceGrid.Registry.Server.Endpoints
IceGrid.Registry.Internal.Endpoints
Should I only specify the endpoint for the registry host, or should I include endpoints for the other registry hosts?
These properties specify the endpoints the registry will listen on. They are not used to connect to other services. So yes, you should only specify endpoints for the host where the registry is running. You can specify multiple endpoints if the host has multiple network interfaces.
eg. For the Master:
IceGrid.Registry.Client.Endpoints=tcp -p 12000 -h 192.168.1.10
IceGrid.Registry.Server.Endpoints=tcp -h 192.168.1.10
IceGrid.Registry.Internal.Endpoints=tcp -h 192.168.1.10
Should I include timeouts for all endpoints?
These endpoints look fine and yes you should also specify timeouts for them (see the C++ demo/IceGrid/replication demo included with your Ice distribution for an example where timeouts are set).
I assume a similar approach is used for IceGrid.Node.Endpoints to only use the specified network interface.
Correct.
N.B. I wish to minimise any network delays by excluding unused network interfaces.
Specifying endpoints with a -h <interface> option ensures that Ice will only listen on this interface and it will only "generate" proxies containing those endpoints.
Query 2:
-----------
If I run my system with only the MASTER node active, my client application on the MASTER node is very inconsistent in startup delay, i.e. from instantaneous up to 30sec. If I reduce the Default Locator to a single endpoint (i.e. the Master) the application is very responsive to startup. Can you explain what might be causing this behaviour? i.e. when there is a list of locator endpoints does Ice randomly attempt to use a Registry from the list which may not be active? What trace attributes could help to diagnose the problem?
Yes, your Ice client most likely tries to connect to unreachable endpoints before trying one that works. You can set Ice.Trace.Network=2 to diagnose the connection establishments. By default, the Ice runtime randomly selects endpoint for connection establishment. This can be changed with the <proxy>.EndpointSelection property. For example, you could set the following for the locator proxy:
Code:
Ice.Default.Locator.EndpointSelection=Ordered
See 36.3.1 Endpoint Selection for more information.
You could also try to reduce the connection establishment to minimize the problem (using the Ice.Override.ConnectTimeout property). You could also consider reducing the number of endpoints since it seems quite unlikely that 6 among 7 replicas can be down at the same time.
Query 3:
-----------
In a proper functioning system is it detrimental to start a REPLICA before the MASTER. I assume the first REPLICA node that starts will assume the role as MASTER until the system is restarted? Or, is it best practice to always start the MASTER first? Ideally we would like our operators to use any combination of PCs for a given session/day, and not be required to always use the MASTER.
Starting slaves before the master is fine. Note however that this slave won't assume the role of master. The role of master is only assumed by the IceGrid registry that is configured to be a master (i.e.: the one whose IceGrid.Registry.ReplicaName property is NOT set or set to "Master").
I recommend reading the following two sections in the IceGrid chapter for more information on the replication of the registry and slave promotion: 38.12 Registry Replication and 38.21.5 Slave Promotion.
Cheers,
Benoit.