Database Replication

Leader-Follower read scaling, Multi-Leader regional writes, and Leaderless Quorum (W + R > N) math

Difficulty: Intermediate · Read time: 8 min · Access: Step-1 Preview + Knoera Pro

How It Works

Database Replication maintains live copies of data across multiple machines for High Availability (HA), geographic locality, and horizontal read scaling. Most Relational SQL systems use Leader-Follower (Single-Leader) replication where one Primary accepts writes and streams its WAL (Write-Ahead Log) to Read Replicas. Multi-Leader setups allow writes in multiple regions (risking write conflicts), while Leaderless Dynamo-style clusters (Cassandra, DynamoDB) use tunable Quorums (`W + R > N`).

Why It Matters

Asynchronous replication gives fast writes because the Leader replies before Followers finish applying changes, but causes Replication Lag—a user who updates their profile and refreshes might hit a lagging replica and see old data. Synchronous replication prevents data loss (zero RPO — Recovery Point Objective) at the cost of higher cross-datacenter write latency.

Interactive Architecture Scenarios

  • Leader-Follower Read Scaling & Lag
  • Failure Mode: Async Failover Data Loss & Split-Brain

Related Lessons in Databases & Storage Internals