Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.44 KB

README.md

File metadata and controls

56 lines (34 loc) · 1.44 KB

PhoenixLibcluster

To start your Phoenix app:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with npm install
  • Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

Run clustering Locally

To make this work, local dev servers need to be started in "named" mode. For example, to start 2 named nodes on the same machine:

PORT=4000 elixir --name [email protected] -S mix phoenix.server &
PORT=4001 elixir --name [email protected] -S mix phoenix.server

In development, the topology is fixed and uses the built-in erlang discovery.

Run on Kubernetes

References

http://learnyousomeerlang.com/distribunomicon

https://github.com/bitwalker/libcluster

http://bitwalker.org/posts/2016-08-04-clustering-in-kubernetes/

https://github.com/NetComposer/nkcluster

http://erlangonxen.org/more/clustering

https://dockyard.com/blog/2016/01/28/running-elixir-and-phoenix-projects-on-a-cluster-of-nodes