To keep an app fast and resilient, you copy your data onto several machines — replicas — spread across the world. If one falls over, another answers. So far so good.
Now a cable is cut, a router dies, a data center drops off the map. The replicas are still running, still serving users, but they can't talk to each other. This is a network partition, and in a system of any real size it is not an "if" but a "when."
In that instant you face a choice you cannot dodge. A write lands on one side of the split. Do you let the other side keep answering reads — risking that it hands back stale data? Or do you refuse to answer until the replicas reconcile — keeping the data correct but going partly offline? You cannot have both. That is the CAP theorem, and it is not a bug to be fixed.
Comments
Loading comments...