Erlang limits

Ulf Wiger <>
Wed Jan 24 13:43:11 CET 2001


On Wed, 24 Jan 2001, Peter Eis wrote:

>Hello,
>
>I've read that it should be possible to increase the maximum number
>of nodes in an Erlang network. We have found some source files where
>the limit of 256 nodes is defined and tried to compile the sources
>but it didn't work.

I have not studied the intricacies of this problem, but I can imagine
that you'd have to look at how pids are represented (a one-byte number
represents the node identity), and look at the source for epmd as
well. I'm sure someone else will give you better advice.


>As we are planning to create an application where it it most likely
>that we will have more than 256 nodes connected to each other this
>is a serious problem for us.

It may not be an unsurmountable problem if your application is not
such that all nodes must talk to each other, or one or more nodes must
be in contact with all other nodes.

If you start the erlang nodes with the flag -connect_all false,
then erlang will not make sure that all nodes connect to all other
nodes. Nodes will still connect automatically as soon as a process on
one node tries to send a message to a process on another node, but
this is something that you can control in your application.

Running your network with connect_all=false means that each node will
only know about a subset of the other nodes -- as long as this subset
is < 256, you won't have a problem with the limit.

You might want to consider using a sort of proxy nodes. It is not too
hard to write a proxy process that allows you to send messages to any
given node in the network, but where the message may have to pass
through another node on the way.

If you'd want to use mnesia on all nodes, you have a bit of a problem,
since you can't tell mnesia to use your proxy to communicate. In this
case, you may need to hack the proxy functionality into the
net_kernel. This is fairly advanced Erlang hacking, but help
sometimes comes from unexpected places...

Note that you can't use globally registered names if you turn off
connect_all.


/Uffe
-- 
Ulf Wiger                                    tfn: +46  8 719 81 95
Senior System Architect                      mob: +46 70 519 81 95
Strategic Product & System Management    ATM Multiservice Networks
Data Backbone & Optical Services Division      Ericsson Telecom AB




More information about the erlang-questions mailing list