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
jakub-zawislak
Hi everyone, I’m coming from the Symfony (PHP) framework. I like Phoenix, but it has a one thing that was build much better in the Symfo...
New
wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
dominicletz
Hi, I thought I had posted my library before but seems I hadn’t. The project is still in early stages but it’s growing and so I think it...
New
bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
384 14585 119
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New

Other popular topics Top

minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
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

We're in Beta

About us Mission Statement