5 ms·
Overview of Consistency Levels in Database Systems
- mjb 4y agoAs expected from Daniel Abadi, this is good stuff. The cross over between isolation levels and consistency levels adds a lot of complexity, which is a real problem when most developers don't deeply understand isolation levels already. Many distributed SQL databases (e.g. Cockroach, spanner) default to strong consistency and strong isolation. This is the right thing to do, because it saves developers from having to reason about the complex interactions between consistency and isolation. They also typically support a "recent snapshot" mode (often called "consistent prefix" in literature) for read-only, which can be good for latency optimizing read only workloads which can tolerate a little bit of staleness, while still not having to think about weak isolation (snapshot on read only transactions is equivalent to serializability).
- alijimin 4y agoIs there a consensus / standard on the wording of the "consistency level" and "system guarantee"? https://dbmsmusings.blogspot.com/2019/06/correctness-anomalies-under.html https://dbmsmusings.blogspot.com/2019/06/correctness-anomali... Classification of serializable systems * (consistency level) READ UNCOMMITTED (ISO) READ COMMITTED (ISO) REPEATABLE READ (ISO) SNAPSHOT ISOLATION SERIALIZABLE (ISO) ONE COPY SERIALIZABLE STRONG SESSION SERIALIZABLE STRONG WRITE SERIALIZABLE STRONG PARTITION SERIALIZABLE STRICT SERIALIZABLE * System Guarantee Dirty read (ISO) Non-repeatable read (ISO) Phantom Read (ISO) Write Skew Immortal write Stale read Causal reverse
- wolf550e 4y ago1. Add (2019) to title. 2. Use https://jepsen.io/consistency https://jepsen.io/consistency
- platz 4y agoAzure Cosmos DB has a great article (with visualizations) on the consistency levels it offers: https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels https://docs.microsoft.com/en-us/azure/cosmos-db/consistency... From strongest to weakest, it's consistency levels are: - Strong - Bounded staleness - Session - Consistent prefix - Eventual