Client-Observed Write Unavailability After a Primary Process Kill: Five Replicated Database Systems at Shipped Settings on a Single Host
Year: 2026
Type: preprint
Abstract: We measure what a writing client sees when the primary of a three-node database cluster is killed with `kill -9`. Five systems were run on one machine over loopback at their shipped settings: PostgreSQL 17.12 with Patroni 4.1.5, MongoDB 9.0.8 (replica set), MySQL 8.4.13 Group Replication, Redis 8.10.2 with Sentinel, and CockroachDB v26.3.6. A single-writer probe issued uniquely numbered writes, the primary was killed (N=30 per cell), and every write was afterwards reconciled against the surviving data. Median client write outage was 22.38 s for PostgreSQL/Patroni at defaults when the Patroni agent dies with the database, 10.45 s for MongoDB, and 21.49 s for MySQL Group Replication. The PostgreSQL figure was measured with the fault at a near-constant point in the leader's heartbeat cycle; the lease arithmetic gives roughly 20–30 s for a fault at an arbitrary moment, which we did not test. Redis with Sentinel (30.92 s) and CockroachDB (4.27 s stall of the in-flight write) are reported separately because their architectures and the meaning of the measurement differ. In the four primary/replica systems the outage tracks failure-detection or election timing rather than promotion work: PostgreSQL's is the remaining life of a 30 s leader key; MongoDB's is its 10 s election timeout plus a median 0.45 s; Redis's is Sentinel's 30 s down-after setting plus a median 0.92 s; MySQL's is 5.4 s of detection plus a near-constant 16.0 s removal phase we could not attribute to a named parameter. The CockroachDB stall was not decomposed. No timing setting was varied outside PostgreSQL, so that the outage follows these settings is arithmetic, not a tested dependence. For PostgreSQL, a cell with tighter timing settings and a narrower fault recovered in 1.89 s. No acknowledged write was lost in the MongoDB, MySQL or CockroachDB cells, where an acknowledgement already implies a majority and a single process kill cannot be expected to lose one. None was lost in the Redis cell either, where replication is asynchronous and loss was possible in principle but unlikely on loopback: 28 writes across 30 runs were acknowledged within 5 ms of the kill. The PostgreSQL defaults cell, which also replicates asynchronously, lost one acknowledged transaction in each of 2 of 30 runs. All results are single-host, loopback, process-kill results.
Author: Krishnan, Sajish
Language: English
Subfield: Computer Networks and Communications
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7236557036
