Skip to main content

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​

Covered by Problems​

ProblemDifficultyLink
Social News Feed (FB News Feed)Medium→
Distributed CacheMedium→
Messaging App (WhatsApp)Medium→
Payment SystemHard→

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