15 September 2005

An OPMN discovery alternative

Multicast is the basic network infrastructure used when wiring together separate OPMN instances like I’ve been describing in these entries.

When you use opmnctl to configure the OPMN instances to work together, you specify a shared multicast address such as *234.1.1.1:6789. The * prefix tells OPMN that it works in discovery mode where it will add peers discovered from the shared communication bus, etc.

However if you don't want to use multicast, but still want to use this cool discovery approach to construct the OPMN topology (ie you don't want to use a fully connected OPMN cluster where each instance has a static pointer to each other instance which is hard to maintain) then you can use a slightly different approach.

What you do is to dedicate one specific instance as the discovery node and then configure each instance with the the OPMN address (host:remote_port) of the chosen discovery node. Each instance will then announce itself to the discovery node when it comes online, obtain the details of the other instances from the discovery node itself, and participatge in other various broadcast activities.

How does it work – let’s say I have 3 installs on 3 different servers. Each install has the default OPMN port set since it’s the single install on that server.

felt.au.oracle.com : remote=6200
giant.au.oracle.com : remote=6200
cervelo.au.oracle.com : remote=6200

We'll designate the “giant” server as our discovery node.

To setup a non multicast discovery cluster, you execute opmnctl on each one as follows:

opmnctl config topology update discover="giant.au.oracle.com:6200"

Note the missing "*" from the address and the use of the actual servername (or IP) with the OPMN request port -- instead of a multicast style address:port entry.

This will insert into the opmn.file the relevant entry which defines the giant.au.oracle.com:6200 instance as the discovery node.

Once you have done that on each instance, you should have an OPMN discoverable topology using direct TCP connections. Goodness never tasted so good.

The OPMN server running on the chosen discovery node (ie giant) should be started before any of the others, but besides that, you should then be able to use the this form of cluster in exactly the same way as if you'd used the multicast model.

No comments: