Skip to main content

What does "master-replica" architecture mean?

The "master-replica" architecture (or "primary-replica") is a replication model where one database server is the primary (master), and the rest are copies (replicas / slaves).

How it works

  1. Every write operation (INSERT, UPDATE, DELETE) runs only on the master server.
  2. The master passes changes to the replicas in real time through the replication mechanism.
  3. The replicas hold up-to-date copies of the data and handle read operations (SELECT).

Why this matters

  • it reduces load on the master, since reads get spread across replicas;
  • it improves fault tolerance, if the master fails, a replica can be promoted to the new primary;
  • it enables read scaling and speeds up the application.

Important: this architecture requires data-consistency mechanisms (so replicas don't fall behind) and failover processes (automatic switchover to a new primary node on failure).

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.