pertsevds
DNSSRVCluster - Elixir clustering with DNS SRV records
After @chrismccord released GitHub - phoenixframework/dns_cluster: Simple DNS clustering for distributed Elixir nodes, I tried to use it but did not get on with it. Because Elixir/Erlang distribution by default works with FQDN names, and dns_cluster works with IPs. But I wanted simple DNS distribution with FQDN names. So, I’ve made a library that works with DNS SRV records (SRV record - Wikipedia).
With DNS SRV records you can add your nodes in FQDN format like this:
_app._tcp.yourdomain.com. 86400 IN SRV 0 10 1234 node1.yourdomain.com.
_app._tcp.yourdomain.com. 86400 IN SRV 0 10 1234 node2.yourdomain.com.
_app._tcp.yourdomain.com. 86400 IN SRV 0 10 1234 node3.yourdomain.com.
_app._tcp.yourdomain.com. 86400 IN SRV 0 10 1234 node4.yourdomain.com.
Installation is simple.
By default it works as an application, but you can use it as a part of your supervison tree too.
PS. To make your life easier with Elixir/Erlang distribution, I recommend you to use Nbpm as it removes any EPMD headache you might have.
Most Liked
pertsevds
Version 0.2.0.
- Refactoring warn_on_invalid_dist/0.
- Tests for warnings from warn_on_invalid_dist/0.
- resolver.lookup now distinguish between successful lookup with 0 names and an error in the lookup.
- Better warnings.
2
Popular in Libraries
I feel kind of stuck with the absence of a proper xml library for Elixir. Currently I use SweetXML which was ok for me more or less to pa...
New
Hey everyone :wave:
Excited to join this forum - I am one of the founders and current project maintainers of a popular and open-source U...
New
I’ve just released stable versions of my Prometheus Elixir libs:
Elixir client [docs];
Ecto collector [docs];
Plugs instrumenter/Export...
New
Dune is a sandbox for Elixir and aims to safely evaluate user-provided code.
You can try it out using this basic Elixir playground made ...
New
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
If you would like to migrate away from node/npm/webpack while still using sass, the dart_sass package provides a installer and runner for...
New
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections.
Fo...
New
I created a new library (rather I pulled out a couple files from my big project), it manages an operating system PID file for the BEAM.
...
New
Bandit is an HTTP server for Plug and WebSock apps.
Bandit is written entirely in Elixir and is built atop Thousand Island. It can serve...
New
For a good number of months I've been working on creating a very basic RTMP live video streaming server. Now that I have a very, very ba...
New
Other popular topics
Hello!
tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability.
After spen...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch.
This project took far...
New
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible.
total = 10
while total != 0
...
New
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
Hey :wave:t3: Elixir community,
I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New







