Keep copies of the same data on many machines — and survive everything that goes wrong when they drift apart.
Replication means keeping a copy of the same data on several machines connected by a network. You do it for three reasons: to keep data close to users (lower latency), to keep working when some parts fail (availability), and to scale out reads across many machines.
Copying data that never changes is trivial. All the difficulty lies in handling changes — and there are three broad approaches: single-leader, multi-leader and leaderless replication.
Reach the last step for the post-mortem: five takeaways from this chapter.