Skip to content
BENIBIX Learn

Read Replica

Development🗃️ DatabasesScaling

Also known as Replica, Read-Only Replica

A copy of a database that only answers reads. It takes load off the main one.

Think of it like

Think of it like extra menus on the tables. All can read one, but only the cook changes it.

Example

Jack's nightly sales report used to slow the shop down. Now it runs on a read replica, and shoppers never notice.

Why it matters

Most apps read far more than they write. Replicas let reads grow without slowing the writes.

Definition

A read replica is a copy of a database that only answers reads. Writes still go to the primary, which sends each change on to the copy. Apps send big reports and searches to the copy, so the primary stays fast. The copy can be a bit behind, most often by under a second. That delay is called lag.

Common mistake

Writing a row, then reading it back from a replica straight away. It may not have arrived yet.

Key takeaways

  1. 1
    Reads only. Writes still go to the primary.
  2. 2
    Spreads the load. Reports run on the copy.
  3. 3
    A little behind. Replication lag is real.