Strong Consistency vs Eventual Consistency
People think strong and eventual consistency differ only in speed. With strong consistency, every read sees the newest write at once. It does not matter which copy you ask. With eventual consistency, a copy may show old data for a short time, then catch up. Strong is slower, and it may turn calls away when the network splits. Eventual stays fast and up, but you may see an old value.
Strong Consistency
Each read shows the last write. It does not matter which copy answers.
Strong consistency means that once a write is done, every read after it sees the new value. It does not matter which copy of the data a reader asks. To do this, the copies must agree before the write is confirmed. That takes extra messages, so writes are slower. If the network splits, such a system may turn requests away rather than give old data.
Eventual Consistency
Copies of data may differ for a moment. Then they all match.
Eventual consistency means copies on different machines may differ for a short time. In the end they all match. A change is saved on one machine first and then copied to the others. While it travels, a reader may see the old value. Once no new changes arrive, every copy catches up. DNS works this way: a changed address can take hours to reach everyone.
In one line
- Strong Consistency
- Each read shows the last write. It does not matter which copy answers.
- Eventual Consistency
- Copies of data may differ for a moment. Then they all match.