You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmoduleHorde.RendezvousDistributiondo@moduledoc""" Distributes processes to nodes uniformly using rendezvous hashing. Given the *same* set of members, it will always start the same process on the same node. """defchoose_node(child_spec,members)doidentifier=Map.drop(child_spec,[:id])caseEnum.filter(members,&match?(%{status: :alive},&1))do[_|_]=alive->{:ok,Enum.max_by(alive,fn%{name: name}->{:erlang.phash2({identifier,name}),name}end)}[]->{:error,:no_alive_nodes}endenddefhas_quorum?(_members),do: trueend
The text was updated successfully, but these errors were encountered:
ruslandoga
changed the title
Check if there is interest in using Rendezvous distribution strategy
Check if there is interest in using highest random weight distribution strategy
Nov 30, 2024
👋
I wonder if there is any interest in implementing the approach described in https://en.wikipedia.org/wiki/Rendezvous_hashing for one of the default Horde distribution strategies.
The text was updated successfully, but these errors were encountered: