I used to think Database replication was magic.

A primary database gets a write. Somehow, a replica on the other side of the world has the same data seconds later. Then I learned about…