discovery

Ulf Wiger <>
Wed Jul 12 09:53:29 CEST 2000


On 9 Jul 2000, Hal Snyder wrote:

>A host is supposed to join an Erlang cluster on boot. Do we have to
>give it an explicit IP address or FQDN of some other host(s) in the
>cluster?
>
>We're considering a multicast group address for this purpose. But
>maybe there's already a solution and I just haven't found it in the
>docs.
>
>What's done with Real Life Erlang apps to get nodes to join up?

Basically, nodes will connect as soon as one process on one node sends
a message to a process on the other -- assuming that the cookies of
the nodes are known on both sides.

One way to make this happen is to configure the application_controller
to sync on startup. It will do this if the 'distributed' environment
variable is defined (via the command line or a sys.config file), and 
'sync_nodes_mandadory' or 'sync_nodes_optional' has been defined (see 
also 'sync_nodes_timeout'.)

Example sys.config file:

[{kernel, [{distributed, [{appA, [, ]},
                          {appB, [, ]}],
           {sync_nodes_optional, [, ]},
           {sync_nodes_timeout, 60000}]}].

(which means "run appA on  if possible, otherwise on ,
the other way around for appB; try to establish contact between 
and  for 1 minute, then continue.")

One thing that is not entirely obvious (although sort of documented
in 'erl -man application') is that you can't e.g. specify only
sync_nodes_mandatory -- you must also specify either the 'distributed'
variable or {start_dist_ac, true}.

>Ideally isn't a cluster a fluid thing, without hard-coded physical
>node assignments?

Ideally, yes. At AXD 301, we have a more flexible (and more
complicated) application controller, called RCM (Runtime Configuration
Manager). Part of it will probably make its way into OTP, and it will
make it easier to configure dynamic clusters on the fly.

/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Network Architecture & Product Strategies    mob: +46 70 519 81 95
Ericsson Telecom AB,              Datacom Networks and IP Services
Varuvägen 9, Älvsjö,                    S-126 25 Stockholm, Sweden




More information about the erlang-questions mailing list