Large number of nodes

sagan sagan@REDACTED
Tue Sep 23 16:23:39 CEST 2003


Hi all,
I have a question regarding a project I am starting to design:

- 2 Servers (Replicating Mnesia and accessing back-end DBs)
- 2000 clients (Periodically quering the servers for data)

I am concerned about having all nodes connected and large amount of 
network chattyness while the majority of machines are idle.

Only rarely, a server will attempt to contact a client (based on a 
previous app registration) and notify it for some event has occured.

I think the following is safe:
- Start all client nodes using -connect_all false
- Start server nodes as usual
- All nodes share the same .erlang.cookie
- When a client queries a server, use erlang:disconnect_node(Node) to 
cleanup the connection.

After simple testing it seems to be okay, but tough for me to recreate an 
environment of 2000 nodes distributed over a national WAN.

I ran the following test: (S=Server C=Client)
Start S1
Start S2
S1 -> Ping S1
(Now S1 and S2 know about each other)

Start C1 with -connect_all false
C1 -> Ping S1
(C1 only knew about S1 and vice-versa, good)
(S2 still only knew of S1)

I was worried S2 would find out about C1, since S2 was not started with 
-connect_all false.  Can anyone explain the algoritm/process for nodes 
establishing connections.

Would using a hidden node for all clients be better?

Thanks in advance...
Sagan





More information about the erlang-questions mailing list