measure of how in sync a storage system in terms of writing then reading
Types (levels of consistency)
Strong consistency (read after write)
-
Updates can be read instantly after a write (higher latency)
-
using Consensus (internally to the distributed storage system) to implement
Eventual consistency
- Updates can be read after x time after updates (lower latency, but risk of stale data)
- A read may not read at a valid state as it is eventually consistent but maybe not at the time of read
- Consistency refers to reading a valid state at any time all the time
When there are multiple storage systems in a system, synchronization has to be done somehow to align them
note:
- Consistency in CAP is a specific type of strong consistency in the scenario of network partitions