Ram
All topicsTopic 15 / 24
Intermediate 1 minute

Database Replication

Replication copies database changes from one node to one or more other nodes. A primary may accept writes while replicas serve reads or provide failover capacity. Replicas improve availability and read scale, but copying takes time, so a read can briefly lag behind a write. A design must define which reads require the newest value.

Key idea

Copies improve resilience and read capacity, but introduce replication lag.

See it in one picture

Follow the arrows

Real-world example

An article service writes new posts to a primary database and serves popular read traffic from replicas. After publishing, the author's own request may be routed to the primary to show the newest version.

Quick check

Can you spot it?

0/2 answered
Question 1

1. What does replication create?

Question 2

2. What can replicas experience?