Akka.Cluster by Akka.NET Team

<PackageReference Include="Akka.Cluster" Version="1.4.41" />

 MembershipState

INTERNAL API

If there are unreachable members in the cluster with any of these statuses, they will be skipped during convergence checks.

If there are unreachable members in the cluster with any of these statuses, they will be pruned from the local gossip

public Reachability DcReachability { get; }

TODO: this will eventually need to be made DC-aware and tailored specifically to the current DC

public Gossip LatestGossip { get; }

public UniqueAddress Leader { get; }

public GossipOverview Overview { get; }

public Member SelfMember { get; }

public MembershipState(Gossip latestGossip, UniqueAddress selfUniqueAddress)

public bool Convergence(IImmutableSet<UniqueAddress> exitingConfirmed)

First check that: 1. we don't have any members that are unreachable, or 2. all unreachable members in the set have status DOWN or EXITING Else we can't continue to check for convergence. When that is done we check that all members with a convergence status is in the seen table and has the latest vector clock version.

public MembershipState Copy(Gossip gossip = null, UniqueAddress selfUniqueAddress = null)

public bool Equals(MembershipState other)

public bool IsLeader(UniqueAddress node)

public UniqueAddress RoleLeader(string role)

Copies the current MembershipState and marks the LatestGossip as Seen by the SelfUniqueAddress.

Never gossip to self and not to node marked as unreachable by self (heartbeat messages are not getting through so no point in trying to gossip). Nodes marked as unreachable by others are still valid targets for gossip.