finds.dev← search

// the find

bitwalker/libcluster

★ 2,159 · Elixir · MIT · updated Jan 2025

Automatic cluster formation/healing for Elixir applications

libcluster handles automatic formation and healing of Erlang/Elixir node clusters via a pluggable strategy system — Epmd, Gossip, Kubernetes (API or DNS), Rancher, and more out of the box. It's for anyone running distributed Elixir/OTP apps who needs nodes to find and reconnect to each other without hand-rolling `Node.connect` calls.

The `Cluster.Strategy` behaviour is genuinely well designed — implement `start_link/1`, optionally override `child_spec/1`, and you get a real OTP process managing connections, which makes custom strategies (like the Supabase-maintained `libcluster_postgres`) straightforward to bolt on. Strategy coverage is broad enough that most real deployment targets (k8s via API or headless-service DNS, Rancher, static host lists, local epmd) are covered without reaching for a third-party package. Integration is a one-line addition to your supervision tree, and it's been stable since 2016 with a minimal, unchanged public API — low risk of breakage on upgrade.

'Healing' here just means retrying `Node.connect` to whatever hosts the strategy reports — there's no split-brain detection or conflict resolution, so you still need `:global`, `horde`, or similar on top if partitions matter to you. The Gossip strategy depends on UDP multicast, which most cloud VPCs (including default AWS setups) block by default, so it's a strategy you pick on paper and then fail to make work. The Kubernetes test suite relies on VCR cassettes of the k8s API that can silently drift from what a real cluster returns, and more modern discovery mechanisms (Postgres, Consul, Digital Ocean) are all pushed out to third-party packages rather than maintained in core.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →