Replication based Multi-Master solutions and design patterns
summary
Describes a WAL‑based mesh that implements BDR logical replication to keep regional Postgres nodes (Tokyo, New York, Sydney) in sync, using node‑independent primary keys (timestamp+nodeID+local sequence), supporting different Postgres versions per node, and allowing partial replication for low latency (local reads ~5ms vs cross‑country ~100ms). Replication is eventually consistent with last‑update‑wins by default, uses replication slots, logs conflicts for testing, and is production‑used by carriers and disconnected fleets—works with zero‑downtime failover.
AI-written summary · about
chapters (12)
- 0:00Start
- 8:07Shared Nothing Architecture
- 10:33Recap
- 12:38Stock Postgres Availability Solutions
- 19:16Zero Downtime Failover
- 19:35The Beauties of Logical Replication
- 22:35Design Principles
- 23:27Primary Key Generation
- 26:10Node Independent Algorithm
- 30:50Master Architecture
- 32:27Conflicts
- 35:29Test for Conflicts
related talks
24mAutomatic DDL Replication with pgEdge Distributed Postgres
22mSecuring Postgres with streaming replication
50mEvolution Of PostgreSQL Replication and High Availability (upto ~ 99.999%)
44mThe journey towards active-active replication in PostgreSQL
34mMassive Multi-node setup with Postgres and BDR in Retail System
09mMulti-Region Replication & DR for Distributed Postgres in Azure Cosmos DB
29mLogical replication theory and concepts
49mPostgreSQL Replication - The Most Exciting Technology on Earth
