code wiki / _hdl_build / nx_ha_quorum.nx

nx_ha_quorum.nx

buildroot/runtime/_hdl_build/nx_ha_quorum.nx

1118 B22 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic ha
docsdependenciesstructsconstsfunctions

about

nx_ha_quorum.nx -- CAP-HA-QUORUM: majority quorum + deterministic leader election for 3+ node clusters, preventing SPLIT-BRAIN. A leader is elected ONLY if a MAJORITY of nodes are healthy (votes*2 > total), so a partitioned minority never promotes itself -> no two primaries. The leader is the lowest-index healthy node (deterministic, no election churn / no coin-flips). Pure integer, gateable offline. Composes with failover for a 3+-node cluster. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_ha_quorum.nx nx_ha_chaos_gate.nx nx_ha_quorum_gate.nx

imports: nx_syscalls.nx

imported by: nx_ha_chaos_gate.nxnx_ha_quorum_gate.nx

structs

none

consts

none

functions

9func qm_has_quorum(votes: i64, total: i64) -> i64
called by 2: qm_leadermain
15func qm_leader(healths: *i64, n: i64) -> i64
called by 2: mainmain calls 1: qm_has_quorum