Pattern 01 / DATA

Primary-Replica (Leader-Follower)

Use this when scaling read traffic without sending every query to the write leader.

Pressure
Scaling read traffic without sending every query to the write leader
Mechanism
A primary accepts writes and streams changes to read replicas; failover promotes a replica when needed
Toll
Replication lag can make replica reads stale; synchronous replication reduces lag but slows writes
Architecture plate01
Diagram for Primary-Replica (Leader-Follower)
Executive brief

Primary-Replica (Leader-Follower) fits when scaling read traffic without sending every query to the write leader. Mechanism: a primary accepts writes and streams changes to read replicas; failover promotes a replica when needed. Use it for read-heavy products such as feeds, catalogs, profiles, dashboards, and reporting views. The toll: replication lag can make replica reads stale; synchronous replication reduces lag but slows writes.

Use when

Read-heavy products such as feeds, catalogs, profiles, dashboards, and reporting views.

Example

Product catalog where checkout writes to the primary while browsing reads from replicas.

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Data Storage Patterns

02Sharding (Horizontal Partitioning)03Consistent Hashing04Write-Ahead Log (WAL)05Event Sourcing06CQRS (Command Query Responsibility Segregation)
02 →