Replication
ELI5 — The Vibe Check
Replication means automatically copying your database to one or more other servers in real time. If the main server dies, a replica takes over. You can also send read queries to replicas to reduce load. It is how serious apps stay up 24/7.
Real Talk
Database replication is the process of synchronizing data across multiple database instances. Primary/replica (master/slave) replication sends all writes to the primary and replicates to read-only replicas. It provides high availability, disaster recovery, and read scalability. PostgreSQL supports streaming replication and logical replication.
When You'll Hear This
"We have a primary and two read replicas for the database." / "Replication lag can cause replicas to serve slightly stale data."
Related Terms
Backup
A database backup is a saved copy of your data at a specific point in time.
Connection Pool
A connection pool pre-opens a bunch of database connections and reuses them instead of opening a new one for every request.
Database
A database is like a super-organized filing cabinet for your app's data.
Sharding
Sharding splits your database across multiple servers based on some rule — like user IDs 1-1M on server 1, 1M-2M on server 2.