Company
Date Published
Author
Timur Yusupov
Word count
1067
Language
English
Hacker News points
None

Summary

YugabyteDB is a Consistent and Partition-tolerant (CP) database that handles network partitions and failovers in a way that ensures High Availability (HA) for most practical situations, even while remaining strongly consistent. During network partitions or node failures, the replicas of impacted tablets form two groups: a majority partition that can establish Raft consensus and a minority partition that cannot. The majority partition elects a new leader among themselves, and the DB accepts new writes after the leader election completes. Minority partitions are available for reads only, but not for writes. YugabyteDB's sharding, replication, and transactions architecture is similar to Google Cloud Spanner, which also handles network partitions and failovers in a CP database with high write availability. After identifying a 25-second recovery time issue during testing, the team dropped and recreated TCP connections, resulting in predictable 5-second failovers after a network partition. The solution allows for tuning of rpc_connection_timeout_ms to enable faster recovery times.