3 ms·
Thanks a ton for Phoenix :D Re the clustering support, I can see in your article here https://dockyard.com/blog/2016/01/28/running-elixir-and-phoenix-projects-o
by sudhirj 9y ago
Thanks a ton for Phoenix :D Re the clustering support, I can see in your article here https://dockyard.com/blog/2016/01/28/running-elixir-and-phoenix-projects-on-a-cluster-of-nodes https://dockyard.com/blog/2016/01/28/running-elixir-and-phoe... that the Erlang VM joins clusters on startup - any idea if it's easy or possible to dynamically join and leave clusters?
Sort of what you'd expect in a cloud environment: one or two bastion servers would have a known IP address, and the remaining would be expected to learn about the cluster when the joined with the bastions.
- notamy 9y ago> any idea if it's easy or possible to dynamically join and leave clusters? Don't know the specifics in Erlang, but in Elixir you can just use Node.connect/1 and Node.set_cookie/2: https://hexdocs.pm/elixir/Node.html https://hexdocs.pm/elixir/Node.html Edit: There's also stuff like libcluster (https://github.com/bitwalker/libcluster https://github.com/bitwalker/libcluster) that allow for this at a higher level afaik.
- zorbash 9y agoWe are happy users of libcluster but there's also https://github.com/mrluc/peerage https://github.com/mrluc/peerage for automatic node discovery.
- hakunin 9y agoYes, connecting to any node connects you to all nodes. I have done exactly this in a production app.