How to Set up a Distributed Elixir Cluster on Amazon EC2

I wrote a thing:

Hope this is helpful!


Thank you for writing things!


Ok, i just registered here while learning elixir and was curious to know how shall I distribute my tiny little services as nodes in a cluster over N networks and voilà there’s a topic with a fine article. This elixir community is awesome and btw bought your book :wink:


Best. Comment. Ever. <3

1 Like

<3! Thanks!

1 Like

Shared your post on the Spanish group of Elixir, they loved it!


1 Like

This makes me very happy. :wink:

Awesome! Thank you so much for putting time into this.

Would love to see how to go about this in an auto-scaling environment (in which the nodes dynamically created and removed, and thus, the hosts are not known at deployment)


Yes, details on how @bentanweihao would recommend to go about in an auto scaling environment would be awesome!

Thanks for writing this up :slight_smile:

A few questions

  1. How secure is the communication between nodes? Does it happen in clear text?
  2. I see that you can execute code on other nodes, are there any particular instances in a phoenix app where this could be useful? The way it is setup in your post HAProxy would distribute the load regardless of the phoenix apps being in a cluster. Do you see any scenarios where cross node communication may be useful?
  1. I think you will want to encrypt the connection

How would you go about encrypting the connection?

One way is to use a VPN.