Erlang limits

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Erlang limits

Peter Eis
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.
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.
I'd very much appreciate if someone could give me a hint how to solve
this problem.

Thanks,
Peter




Reply | Threaded
Open this post in threaded view
|

Erlang limits

Ulf Wiger-4
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



Reply | Threaded
Open this post in threaded view
|

Erlang limits

Peter Eis

Ulf Wiger wrote:

>> 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.

That really might save us from further troubles. Indeed only some nodes
have to be fully connected while the clients don't have to know each other.

>
>
> 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.

We discussed that possibility too. In combination with connect_all=false
I think it's the way we'll go as now we just have to set up some nodes
to communicate with the clients. The only disadvantage is that the
messages will have to pass one more node. But as passing messages is
pretty fast that won't be a problem.

Thank you very much for the quick response.

Regard,
Peter