Architecturemono
Primary and Read Replicas
A database setup with one primary for writes and two read replicas, with the API sending writes and reads separately.
Start from this template
Opens in the editor. No signup. Export SVG, PNG, or an embed link.
Source text
title: Primary and Read Replicas
theme: mono
node api "API" [service]
node primary "Primary" [database]
node r1 "Replica 1" [database]
node r2 "Replica 2" [database]
primary right-of api
r1 below primary
r2 right-of r1
api -> primary : "writes"
api -> r1 : "reads"
api -> r2 : "reads"
primary -> r1 : "replicate"
primary -> r2 : "replicate"About this template
The API sends writes to a primary database and spreads reads across two read replicas. The primary replicates changes to both replicas.
Use it when you explain read scaling or why a read right after a write can return old data (replication lag). The separate "writes" and "reads" labels make the split obvious.
To show more replicas, add a node and place it with right-of the last replica. If your system has a failover setup, you can rename one replica "Standby" and explain the failover in the doc that goes with it.