Course contentsShow
← System Design
Lesson 71 of 1,9192. Scaling FoundationsFree lesson

Single-Leader Replication Model

Understanding the most common replication topology where one node handles writes and others replicate reads.

Single-Leader Replication Model

What you'll learn: How the most common replication pattern uses one "leader" node to accept writes while followers serve reads.

The Core Idea

In a single-leader replication model (also called master-slave or primary-replica), one designated node — the leader — accepts all write operations. The leader then sends these changes to one or more follower nodes, which create copies of the data. Followers can handle read requests, but they don't accept writes directly.

Think of it like a classroom: the teacher (leader) writes on the master whiteboard, and students (followers) copy notes into their notebooks. Students can refer to their own notebooks to answer questions (reads), but only the teacher updates the master board (writes).

How It Works

  1. Client sends a write → Goes only to the leader
  2. Leader processes the write → Updates its local database
  3. Leader propagates changes → Sends the update to all followers
  4. Followers apply changes → Eventually have the same data
  5. Clients send reads → Can go to leader OR any follower

Why This Model Is Popular

  • Simple to reason about: One source of truth for writes prevents conflicts
  • Read scalability: Add more followers to distribute read load
  • Clear consistency model: Leader always has the latest data
  • Well-understood patterns: Decades of proven operational experience

The Trade-off

Followers might lag slightly behind the leader (called replication lag), so reads from followers might be slightly stale. However, this trade-off is acceptable for most applications because it allows you to scale read capacity horizontally while keeping writes simple.

Key Takeaway: Single-leader replication sends all writes to one leader node and replicates changes to followers, providing read scalability while maintaining a simple, conflict-free write path.