Every node takes writes.
Multi-primary replication: a transaction committed on one node is batched, compressed and shipped to the others over TLS 1.3, ordered by a hybrid logical clock. No primary to fail over from, no promotion step when one goes away.
A commit on one node, applied on every other
Multi-primary replication: every node takes writes. A committed transaction is captured through the write-ahead log, batched, compressed and shipped over TLS 1.3, and applied on each peer exactly once.
- 1Commit on node 1
A transaction commits on node 1 and is stamped with a hybrid logical clock: milliseconds plus a counter.
- 2Captured ahead
Its changes are written to the replication log through the same write-ahead log, before the commit returns.
- 3Batched and compressed
Each peer link reads from where that peer is, gathers a batch over a short linger, and compresses it with zstd when that helps.
- 4Shipped over TLS 1.3
Peers pin each other's certificates or trust a cluster CA.
- 5Applied exactly once
Each peer applies one batch per sync, each transaction once, in HLC order. Loops in a mesh are cut.
- 6Conflicts by policy
If node 3 changed the same row at the same time, the policy decides: abort (default), skip, or last writer wins.
The shape
Every node accepts reads and writes. Commits are captured ahead of the commit through the database's own write-ahead log, read from where each peer is, batched with a linger, compressed with zstd when that helps, and applied on the far side one batch per sync, each transaction exactly once.
- Its own rastcp listener and port, TLS 1.3
- Mutual certificate pinning or a cluster CA
- Loop prevention in a mesh of any size
- Reconnect and resume from the peer's applied position
Conflicts, decided by you
Two nodes can change the same row at once. You choose what happens: abort the second (the default), skip it, or let the last writer by hybrid-logical-clock time win. A commit can also wait for a quorum of peers (REPLICATION SET mode = 'quorum:1').
REPLICATION ADD PEER 'berlin' ADDRESS '10.0.0.2:61171'; REPLICATION ADD PEER 'tokyo' ADDRESS '10.0.1.7:61171' WITH (COMPRESSION = 'zstd:3'); REPLICATION SET conflict = 'last-writer-wins'; REPLICATION ENABLE; SHOW REPLICATION PEERS;
What it is, and what it is not
This is eventually consistent multi-primary replication, not consensus. Nodes converge; they do not vote. It is the right shape for two sites that must both stay writable through a link failure, and for read scaling close to users. A commit acknowledged on one node is durable there before it is shipped.