dnsimple / erldns

DNS server, in Erlang.
MIT License
398 stars 98 forks source link

Distributed Mnesia #105

Closed nisbus closed 4 years ago

nisbus commented 4 years ago

Makes mnesia replicate all data between nodes.

On startup, if there are other nodes in the cluster the mnesia storage will replicate from the other nodes.
Multiple nodes will then have all records synced between them.

Testing:

{erldns
      {storage, [
             {type, erldns_storage_mnesia},
             {dir, "./one"}
            ]
      }
}
{mnesia,
[
{dir, "./one"}
]},

Run the first node:

rebar3 shell --sname one --setcookie dns

Run the second node:

rebar3 shell --sname two --setcookie dns

Test that both nodes respond with the first node zones.

dig @127.0.0.1 -p 8053 example.com
dig @127.0.0.1 -p 8054 example.com