Skip to content
Glossary · System design

Read replica

Also called replica database, read-only replica.

Definition

A read-only copy of a database that is kept in sync with the main database and takes read queries off it.

Last updated

What it is.

All writes go to the primary database. Changes are copied to one or more replicas, which answer read queries such as reports, search pages and dashboards. Replicas can sit in other regions to serve distant users faster.

Copying takes time, called replication lag. It is often a fraction of a second, but under load it can grow, so a replica may briefly show slightly old data.

Why it matters

Most apps read far more than they write. Replicas let you add read capacity without a bigger primary, keep heavy reports from slowing down users and give a warm copy that can help in recovery.

In a product build

We route only reads that can tolerate slight delay to replicas, keep read-after-write flows (like showing a user what they just saved) on the primary, monitor lag and alert on it, and use connection pooling for each database.

Watch out

Common mistakes.

  1. 01

    Sending a user's read right after their own write to a replica, so their change seems lost.

  2. 02

    Treating a replica as a backup. A bad delete replicates too.

  3. 03

    Not watching lag, so reports quietly show stale numbers.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab