WAL Streaming Replication with Quorum-Based Split-Brain Detection for Embedded Databases
We present a high-availability replication system for embedded databases (SQLite-class deployment model) implementing warm standby architecture with WAL streaming, automatic failover, quorum-based split-brain prevention using fencing tokens and epoch-based leadership, multi-phase controlled switchover coordination, and logical replication for selective table sync. The split-brain module uses observer (witness) nodes for quorum: a 3-node cluster (1 primary + 2 standby) requires quorum of2; a 2-node + 1-observer configuration also achieves quorum of 2. Fencing tokens ensure that write operations from a stale primary are rejected by standbys that have accepted a higher epoch. While WAL-based replication is standard in server databases (PostgreSQL, MySQL), no embedded database (SQLite, DuckDB, LevelDB, RocksDB) provides built-in replication with split-brain detection, fencing tokens, role management, and controlled switchover.
Authors
- Daniel Moya Vaca
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-03-27
- DOI
- https://doi.org/10.5281/zenodo.19244373
- Primary Topic
- Distributed systems and fault tolerance
- Type
- article
- Field-Weighted Citation Impact
- 0.00