Core Scale & Availability
Primary–replica and multi-primary replication to scale reads and improve HA
Maintain multiple copies of data across nodes. Use asynchronous or synchronous replication to improve read scale, availability, and geo-distribution; handle conflicts for multi-primary.
When reads outpace a single primary, you need failover/HA, or want regional read locality.
OLTP systems needing high read throughput and maintenance without downtime.
# App-side routing sketch (Python pseudocode)
def read(query):
replica = pick_replica(lag_threshold_ms=200)
return replica.execute(query)
def write(cmd):
return primary.execute(cmd)
Primary-replica with semi-sync for HA
Thousands of replicas at large orgsStreaming replication and Patroni failover
Hundreds of terabytes replicatedReplica sets with automatic elections
Global clusters with many nodesRead-focused - Many followers
High - Lag and failover management
Medium to High - Extra nodes