Skip to catalogue

102

replication

Copies of the same data on more than one node. Copies drift unless you say how writes propagate.

What is replication?

Replication keeps a copy so you can survive a dead disk and sometimes serve reads closer to the user. Synchronous replication waits for copies before acknowledging. Asynchronous replication acknowledges early and can lose the last writes.

Why does replication matter when vibe coding?

Models add a “replica” in a diagram and acknowledge writes from memory. On failover those writes vanish. Name sync vs async and what failover promotes.

How do you do replication?

Writes go to a primary. Replicas follow. If you ack only after the sync replica, failover can be lossless. If you ack early, say what the user can lose.

How do you ask a model for replication?

Replicate (store). Writes hit a primary. Acknowledge only after (sync replica / local commit — pick one and name the loss). Failover must promote a replica, not invent a new empty node.

What goes wrong with replication?

Reading from a lagging replica and treating it as the write you just did. The user saves, refreshes, and the row is gone for a second. Route that read to the primary.

adjacent