Expand description
atomr-cluster. akka.net: src/core/Akka.Cluster/.
Contains membership, gossip, reachability, heartbeat, and the split-brain resolver strategies.
Structs§
- Cluster
Daemon Handle - Public handle to a running
ClusterDaemon. - Cluster
Event Bus - In-process cluster events bus.
- Cluster
Remote Adapter - Cross
DcSettings - Slow-path settings used for cross-DC heartbeats / gossip.
- Daemon
Config - Configuration knobs.
- Daemon
Snapshot - Snapshot of the daemon state used by
peer_statequeries. - Gossip
- Gossip
Overview - Snapshot of seen-by + unreachable info. akka.net:
GossipOverview.cs. - Heartbeat
Sender - In-memory heartbeat-sender state.
- Heartbeat
State - Keep
Majority Strategy - KeepMajority: the side with strictly more up members survives.
- Keep
Oldest Strategy - KeepOldest: the side containing the oldest (lowest
up_number) up member survives. - Keep
Referee - KeepReferee: the side containing the designated
refereemember survives. - Lease
Majority Strategy - LeaseMajority: majority decision gated by an external lease. In-memory simulation of whether a lease was acquired.
- Member
- Membership
State - NoSbr
- Marker
DowningStrategyused when no SBR runtime is installed. - Peer
Heartbeat - Per-peer heartbeat record kept by the sender.
- Reachability
- SbrRuntime
- Runtime that pairs a strategy with a stability deadline.
- Split
Brain Resolver - Facade that holds any of the strategies behind a trait object.
- Static
Quorum Strategy - StaticQuorum: requires at least
quorum_sizereachable members to survive. - Subscription
Handle - RAII handle returned by
ClusterEventBus::subscribe. Dropping it removes the corresponding subscriber. - Vector
Clock
Enums§
- Cluster
Event - Event variants published on
ClusterEventBus. - Daemon
Cmd - Control commands accepted by the daemon mailbox.
- Downing
Decision - What the resolver recommends the cluster do with the given side.
- Gossip
Decision - Decision the receiver makes after comparing version vectors.
- Gossip
Pdu - One gossip exchange. Sender hands a
GossipStatusto the peer; peer responds with either a fullGossipEnvelope(if it has newer state) or aGossipMergerequest (if its state is older). - Member
Status - Reachability
Status - SbrAction
- Action emitted by
SbrRuntime::tick. - Vector
Relation
Constants§
- DC_
ROLE_ PREFIX - Convention: a member’s data-center is encoded as a role of the
form
"dc-<name>". Akka.NET uses the same prefix. - DEFAULT_
DC - Default DC name used when no
dc-*role is present.
Traits§
- Downing
Strategy - Gossip
Transport - Pluggable transport for gossip PDUs.
Functions§
- elect_
leader - Pick the deterministic leader from a
MembershipState. - gossip_
decide - Pure decision function: given the local + remote version vectors, what should we do?
- heartbeat_
interval_ for - Pick the heartbeat interval to use against
peerfrom the perspective oflocal: in-DC peers getlocal_interval, cross-DC peers getcross.heartbeat_interval. - is_
converged - Convergence holds when every member that this node believes is
alive is also reachable. Akka.NET’s gossip uses convergence as a
pre-condition for the leader’s status-transition tick (the
leader won’t move members from
Joining → Upwhile a partition is in flight). - member_
dc - Extract the data-center name from a member’s role list. Returns
DEFAULT_DCwhen nodc-*role is set. - next_
status - Compute the next status for a member given the current convergence
state. Returns
Noneif no transition applies. - partition_
by_ dc - Partition a peer list into
(in_dc, cross_dc)fromlocal’s perspective. - pick_
gossip_ target - Pick the next peer to gossip with, given a list of known peer
addresses and a per-tick cursor. Skips
self_addr. - same_dc
trueifaandbbelong to the same data-center.- spawn_
daemon - Spawn a daemon. The caller provides a transport implementation; the daemon never blocks on it.
- spawn_
daemon_ with_ sbr - Same as
spawn_daemonbut installs an SBR runtime.