aseigo
In this week’s episode we look at the basics of how clustering Elixir nodes works, and how to automate their creation using libcluster (using UDP Gossip, but also supports Kubernetes, EC2 and DNS service discover) as well as how to replace epmd itself.
An Extra episode will be available tomorrow or the next day as well covering some updates to last week’s episode, some musings on the current limitations of BEAM clustering (security, scalability), and a look at how the show’s git repo is being organized.
I hope you all enjoy! ![]()
Trending in Screencasts
Plotto is a 100% Elixir charting library with no NIFs or external dependencies. In this episode, we’ll use it to add interactive SVG char...
New
Other Trending Topics
Hey there,
I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first.
...
New
Hi everyone :waving_hand:
I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
New
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly)
AI dream has many faces, but general...
New
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #code-sync
- #discussion
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #ai
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #elixirconf-us
- #blog-post
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #elixirconf-eu
- #processes
- #security
- #api
- #forms
- #performance










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
arkgil
Great episode @aseigo!
aseigo
Thanks, just happy when people get something from them as well!
Crowdhailer
This is a great quick screencast thank you.
Exactly what I needed, hopefully I will find the time soon to add libcluster to my tokumei project generator. Then quickstart can be even smoother.
BartOtten
@aseigo, tnx for the screencasts and all the expertise you’ve shared in various communities.
globalkeith
Great work Arron, your screencast foo is powerful. Keep up the great work!
pggalaviz
Amazing screencast! However I cloned the repo and can’t get it to work on development machine.
Starting
libclusteron first node isn’t an issue, the heartbeat starts to appear, but when I try to run it on a second node it raises an error:{:failed_to_start_child, Cluster.Strategy.Gossip, {{:badmatch, {:error, :eaddrinuse}}, [...] ...}Seems there is some process already running in the required address/port and
libclustercan’t start.aseigo
Hm.. which operating system, and what are the exact steps you are taking that lead to this?
Or .. do you have some other process bound to port 45892 (and probably needs to be a UDP connection ..)? You can change the default port used by libcluster by editing config/libcluster.exs and adding
port: <something other number>to the exploring_elixir topology section.pggalaviz
Thanks for replying!
Running on:
MacOS Sierra 10.12.6
erlang/OTP 20
elixir 1.5.2
libcluster 2.2.3
Just cloned the repo and installed deps (nothing changed) and after successfully starting the first node with
iex --sname node-1 -S mixandExploringElixir.AutoCluster.start(), if i runlsof -i :45892this shows up:Trying to start the second node
iex --sname node-2 -S mixandExploringElixir.AutoCluster.start()shows the error I previously mentioned:Changing the
port: <some_other_number>didn’t fix the issue, I even tried to set the port to0so a random and available one is picked, in this way the second node can successfully start but it wont be able to automatically connect to the first or any other node.This is my
config/libcluster.exs:Maybe I’m just not getting the
configuration part, or some other setup is required to run multiple nodes in
devmode.As far as I know a UDP socket can’t share the same address/port with other process or be restarted:
but in your screencast it seems to work fine, so I’m confused haha.
aseigo
UDP ports can be open by multiple processes if in broadcast mode .. but this requires binding to an interface that supports UDP broadcasting. I don’t have a Mac to test this on, but it apparently can require a bit of config .. see: Multicast overlays · gossiperl/gossiperl Wiki · GitHub
Would be interested to know if that resolves it for you …
pggalaviz
Unfortunately that didn’t help.
According to this:
since MacOS 10.10.5, two unbound (wildcard) UDP sockets can not share the same port anymore.
So, for my project I’ll use the hardcoded epmd strategy only for development, I prefer spending more time on my app’s issues than dealing with my computer’s configuration.
Thanks a lot for your help and the amazing screencast! keep them coming!