Designing highly available database clusters traditionally mandates operating separate Distributed Coordination Services (like etcd, Consul, or ZooKeeper) alongside the database. This introduces architectural bloat, complex failure modes, and significant operational overhead when avoiding critical split-brain conditions during severe network partitions.
Witch
A production-grade, multi-database High Availability daemon.
Witch is a single binary that manages database clusters handling leader election, automatic failover, and replication monitoring. It embeds a complete Raft consensus algorithm, replacing all need for an external Distributed Coordination Service.
Engineered a production-hardened, single-binary daemon in Zig that embeds a complete Raft consensus algorithm directly alongside the database process. The system introduces a protocol-agnostic adapter interface to seamlessly support multi-database setups, coupled with STONITH fencing, failsafe modes for network isolations, and strict synchronous replication promotion gates.
Eliminated split-brain vulnerabilities while radically simplifying deployment infrastructure. By removing the dependency on external coordination services, operational overhead was vastly reduced, guaranteeing entirely deterministic leader elections and graceful switchovers without requiring any database-level extensions.