Has anyone managed to connect mnesia on two machines with libcluster and gossip strategy?
I know it’s way too late but I just bumped at your question.
No, but I did manage to make it work using libcluster’s Kubernetes.DNS
and LocalEpmd
strategies (for prod and dev respectively), in case it helps somehow.
An input in local dev mode, the Gossip strategy works for me when I add a Process.sleep
within the handle_info({:nodeup, node},..)
in the Cache GenServer. This seems to be needed for the first start, when the tables are created on each node disc to overcome the communication latency.
Still in a local cluster in dev monde. I modified my strategy and wrapped Mnesia into a supervised GenServer. I only have to loop on Mnesia start-up to ensure the successful launch of multiple nodes.