code wiki / _hdl_build / nx_ha_quorum.nx
nx_ha_quorum.nx
buildroot/runtime/_hdl_build/nx_ha_quorum.nx
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
imports: nx_syscalls.nx
imported by: nx_ha_chaos_gate.nxnx_ha_quorum_gate.nx
structs
| none |
consts
| none |
functions
| 9 | func qm_has_quorum(votes: i64, total: i64) -> i64 |
| 15 | func qm_leader(healths: *i64, n: i64) -> i64 |