SuperCache.Cluster.Raft.Topology (SuperCache v1.9.0)

Copy Markdown View Source

Derives the Raft cluster sizing diagnostic.

A cluster with replication_factor: N is considered healthy when it has at least N + 1 live nodes, so a spare node remains available for failover and repair. Below that threshold the topology is :underprovisioned; the status is advisory and never blocks startup or writes.

Summary

Functions

Evaluate topology for a given node count and replication factor.

Refresh the stored topology from the current cluster state.

Refresh the stored topology from an explicit node list.

Return the last evaluated topology, or nil when raft mode is inactive.

Functions

evaluate(node_count, replication_factor)

@spec evaluate(non_neg_integer(), non_neg_integer()) :: map()

Evaluate topology for a given node count and replication factor.

refresh()

@spec refresh() :: map()

Refresh the stored topology from the current cluster state.

refresh(nodes)

@spec refresh([node()]) :: map()

Refresh the stored topology from an explicit node list.

status()

@spec status() :: map() | nil

Return the last evaluated topology, or nil when raft mode is inactive.