#Handling a mesh of Erlang nodes

1 messages · Page 1 of 1 (latest)

hot agate
wind latch
#

You name them when you start them

hot agate
#

Yes

wind latch
#

You can either have some automated cluster formation system or you can just connect by name

#

There's lots of options

hot agate
#

Is storing the names in a db table a good idea?

#

Like so:
Node 1 turns on, gets its name using node() and stores its name on the table. Sees there is no other node in the table and waits
Node 2 turns on, gets its name using node() and stores its name on the table. Sees node 1 name on the table and connects to it

wind latch
#

It's hard to say without knowing anything about your infrastructure

hot agate
#

Imagine the project is on fly and each node is a server in a region

wind latch
#

You would probably use DNS for that

#

Can see how the Elixir peeps tend to do it here

hot agate
#

I think I got it

#

It basically scans all nodes in the same DNS

#

Now I just need to understand this elixir code

#

At least if I figure it out I'll (probably) make it a library

#

(Along with the PostHog library I'll make one day)

wind latch
hot agate
#

If I got it right, the DNSCluster is an actor

hot agate
#

Actually, someone already made a port of DNSCluster

#

it's nessie_cluster