anuaralfetahe

anuaralfetahe

Elector - leader node election

Hello, I decided to split my larger project into smaller libraries. As a result, I have released the first library written in Erlang called Elector.

Elector is a library that automatically selects the leader node from an Erlang cluster. It reacts automatically when a node joins or leaves the cluster and initiates election. It is possible to configure the code to be executed before and after automatic election using hooks.

By default, Elector uses a voting strategy that selects the node with the highest runtime, but it is possible to override this with a custom strategy.
Elector supports different configuration options.

I am hoping to receive any feedback on what could be improved or any other thoughts.

Github link

Hex documentation

Thanks! :slight_smile:

Most Liked

tj0

tj0

Does this do any split-brain detection? Didn’t find the keyword “quorum” that I was looking for in the documentation for my use case.

Last Post!

anuaralfetahe

anuaralfetahe

Yes it supports configuration option quorum_size which basically defines the minimum amount of nodes in the cluster needed for starting the election process. By default it’s 1 which means no checks. Please keep in mind that the configuration must be same across all nodes.

And thanks for pointing it out I have to update the readme file.
The documentation can be found here elector v0.3.3 — Documentation

Where Next?

Popular in Announcing Top

Crowdhailer
Experimenting with this code. OK.try do user <- fetch_user(1) cart <- fetch_cart(1) order = checkout(cart, user) save_orde...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps w...
New
michalmuskala
Hello everybody. I have just released Jason - a new JSON library. You might be wondering, why do we need a new library? The primary foc...
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
brainlid
LangChain is short for Language Chain. An LLM, or Large Language Model, is the “Language” part. This library makes it easier for Elixir a...
New
Flo0807
Hello everyone! I am excited to share our heart project Backpex with you. After building several Phoenix applications, we realized that...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
bsollish-terakeet
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
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement