.NET Architecture & System Design Interview Question #54

What is a read replica?

Database Scaling, Partitioning, NoSQL & Data Consistency Mid-Level Intermediate

Quick Interview Answer

A read replica is a database copy that receives replicated changes from a primary database and serves read workloads. It can reduce read pressure on the primary when the application has many queries relative to writes.

Detailed Explanation

A read replica is a database copy that receives replicated changes from a primary database and serves read workloads. It can reduce read pressure on the primary when the application has many queries relative to writes.

Replication lag means a replica may temporarily return older data. Requests that require read-your-own-write consistency may need to use the primary or another consistency mechanism.

Code Example

Writes -> Primary
            |             v  v
          Read Replica 1
          Read Replica 2
              ^
              |
             Reads