Database Replication
Difficulty: Medium | Topic #11
What to Learn
Leader-follower (master-slave) replication, read replicas for scaling reads, synchronous vs asynchronous replication, replication lag and eventual consistency implications, failover.
Resources
- Hello Interview: Scaling Reads ↗
- ByteByteGo: Database Replication Explained ↗
- Hussein Nasser: Database Replication Crash Course ↗
Covered by Problems
| Problem | Difficulty | Link |
|---|---|---|
| Social News Feed (FB News Feed) | Medium | → |
| Distributed Cache | Medium | → |
| Messaging App (WhatsApp) | Medium | → |
| Payment System | Hard | → |
Key Concepts to Master
- Synchronous vs asynchronous replication tradeoffs
- Replication lag and read-your-writes consistency
- Multi-leader replication and write conflicts
- Semi-synchronous as a middle ground
- Automated failover with leader election