Galaxy

This library provides a mechanism for automatically forming clusters of Erlang nodes, with either static or dynamic node membership. It provides a publish/subscribe mechanism for cluster events so that you can easily be notified when cluster members join or leave with a variety of strategies provided out of the box.

You can find supporting documentation here.

Features

Installation

defp deps do
[{:galaxy, github: "~> 0.3"}]
end

Usage

It is easy to get started using galaxy, start the module in the supervision tree of an application in your Elixir system. And configure the it using:

# In your config/releases.exs file
headless_service =
System.get_env("SERVICE_NAME") ||
raise """
environment variable SERVICE_NAME is missing.
You can retrieve a headless service using a StatefulSets
"""
config :cruise, Cruise.Cluster,
services: [headless_service],
polling: 10_000
# In your application code
defmodule MyApp.Cluster do
use Galaxy.Cluster,
otp_app: :my_app,
topology: Galaxy.Topology.ErlDist
end

The following section describes topology configuration in more detail.

Clustering

You have a handful of choices with regards to cluster management out of the box:

License

MIT