code wiki / _hdl_build / nx_ha_failover.nx
nx_ha_failover.nx
buildroot/runtime/_hdl_build/nx_ha_failover.nx
about
nx_ha_failover.nx -- CAP-HA-FAILOVER: multi-node failover to KILL THE SPOF (the single NAS the stability census
flagged as our AWS-gap). Deterministic failover state machine over two nodes' health: primary down + standby up
-> promote standby; both down -> DEGRADED (honest, never a false "up"); recover to the primary when it returns.
Conservative (fail back only when the current active is down) -> no flapping. Pure integer, gateable offline;
composes the true-health verdict (mc_verdict UP/DOWN). The DATA-PLANE replication + a real standby host are the
infra rungs this logic drives. license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_ha_chaos_gate.nxnx_ha_failover_gate.nx
structs
| none |
consts
| 9 | const HA_PRIMARY: i64 = 0 |
| 10 | const HA_STANDBY: i64 = 1 |
| 11 | const HA_DEGRADED: i64 = 2 |
| 12 | const HA_DOWN: i64 = 0 |
| 13 | const HA_UP: i64 = 1 |
functions
| 17 | func fo_step(st: *i64, primary_health: i64, standby_health: i64) -> i64 |