BDR (Bi-Directional Replication) v3.6
BDR (Bi-Directional Replication) is a ground-breaking multi-master replication capability for PostgreSQL clusters that has been in full production status since 2014. In the complex environment of replication, this 3rd generation of BDR achieves efficiency and accuracy, enabling very high availability of all nodes in a geographically distributed cluster. This solution is for top-tier enterprise applications that require near-zero downtime and near-zero data loss.
As a standard PostgreSQL extension BDR does this through logical replication of data and schema along with a robust set of features and tooling to manage conflicts and monitor performance. This means applications with the most stringent demands can be run with confidence on PostgreSQL.
BDR was built from the start to allow for rolling upgrades and developed in conjunction with partners who were replacing costly legacy solutions.
Available as two editions, BDR Standard provides essential multi-master replication capabilities for delivering row level consistency to address high availability and/or geographically distributed workloads. BDR Enterprise adds advanced conflict-handling and data-loss protection capabilities.
To provide very high availability, avoid data conflicts, and to cope with more advanced usage scenarios, the Enterprise edition provides the following extensive additional features:
- Eager replication provides conflict free replication by synchronizing across cluster nodes before committing a transaction
- Commit at most once consistency guards application transactions even in the presence of node failures
- Conflict-free replicated data types (CRDTs) provide mathematically proven consistency in asynchronous multi-master update scenarios
- Column level conflict resolution enables per column last-update wins resolution to merge updates
- Transform triggers execute on incoming data for modifying or advanced programmatic filtering
- Conflict triggers provide custom resolution techniques when a conflict is detected
BDR Enterprise requires EDB Postgres Extended v11 (formerly known as 2ndQuadrant Postgres) which is SQL and on-disk compatible with PostgreSQL.
The Standard edition provides loosely-coupled multi-master logical replication using a mesh topology. This means that you can write to any node and the changes will be sent directly, row-by-row to all the other nodes that are part of the BDR cluster.
By default BDR uses asynchronous replication to provide row-level eventual consistency, applying changes on the peer nodes only after the local commit.
The following are included to support very high availability and geographically distributed workloads:
- Rolling application and database upgrades to address the largest source of downtime
- DDL replication supports changes to application schema, ideal for use in continuous release environments
- Sequence handling provides applications different options for generating unique surrogate ids that a multi-node aware
- Tools to assess applications, monitor operation, and verify data consistency
BDR Standard requires PostgreSQL v10 or v11.