You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -14,11 +14,13 @@ Distributed databases that rely on replication for high availability, low latenc
14
14
15
15
Most commercially available distributed NoSQL databases available in the market today provide only strong and eventual consistency. Azure Cosmos DB offers five well-defined levels. From strongest to weakest, the levels are:
For more information on the default consistency level, see [configuring the default consistency level](how-to-manage-consistency.md#configure-the-default-consistency-level) or [override the default consistency level](how-to-manage-consistency.md#override-the-default-consistency-level).
22
24
23
25
Each level provides availability and performance tradeoffs. The following image shows the different consistency levels as a spectrum.
24
26
@@ -71,10 +73,10 @@ Bounded staleness offers total global order outside of the "staleness window." W
71
73
72
74
Inside the staleness window, Bounded Staleness provides the following consistency guarantees:
73
75
74
-
- Consistency for clients in the same region for an account with single write region = Strong
75
-
- Consistency for clients in different regions for an account with single write region = Consistent Prefix
76
-
- Consistency for clients writing to a single region for an account with multiple write regions = Consistent Prefix
77
-
- Consistency for clients writing to different regions for an account with multiple write regions = Eventual
76
+
- Consistency for clients in the same region for an account with single write region = [Strong](#strong-consistency)
77
+
- Consistency for clients in different regions for an account with single write region = [Consistent Prefix](#consistent-prefix-consistency)
78
+
- Consistency for clients writing to a single region for an account with multiple write regions = [Consistent Prefix](#consistent-prefix-consistency)
79
+
- Consistency for clients writing to different regions for an account with multiple write regions = [Eventual](#eventual-consistency)
78
80
79
81
Bounded staleness is frequently chosen by globally distributed applications that expect low write latencies but require total global order guarantee. Bounded staleness is great for applications featuring group collaboration and sharing, stock ticker, publish-subscribe/queueing etc. The following graphic illustrates the bounded staleness consistency with musical notes. After the data is written to the "West US 2" region, the "East US 2" and "Australia East" regions read the written value based on the configured maximum lag time or the maximum operations:
80
82
@@ -86,11 +88,11 @@ In session consistency, within a single client session reads are guaranteed to h
86
88
87
89
Clients outside of the session performing writes will see the following guarantees:
88
90
89
-
- Consistency for clients in same region for an account with single write region = Consistent Prefix
90
-
- Consistency for clients in different regions for an account with single write region = Consistent Prefix
91
-
- Consistency for clients writing to a single region for an account with multiple write regions = Consistent Prefix
92
-
- Consistency for clients writing to multiple regions for an account with multiple write regions = Eventual
93
-
- Consistency for clients using the [Azure Cosmos DB integrated cache](integrated-cache.md) = Eventual
91
+
- Consistency for clients in same region for an account with single write region = [Consistent Prefix](#consistent-prefix-consistency)
92
+
- Consistency for clients in different regions for an account with single write region = [Consistent Prefix](#consistent-prefix-consistency)
93
+
-(#consistent-prefix-consistency)Consistency for clients writing to a single region for an account with multiple write regions = [Consistent Prefix](#consistent-prefix-consistency)
94
+
- Consistency for clients writing to multiple regions for an account with multiple write regions = [Eventual](#eventual-consistency)
95
+
- Consistency for clients using the [Azure Cosmos DB integrated cache](integrated-cache.md) = [Eventual](#eventual-consistency)
94
96
95
97
Session consistency is the most widely used consistency level for both single region as well as globally distributed applications. It provides write latencies, availability, and read throughput comparable to that of eventual consistency but also provides the consistency guarantees that suit the needs of applications written to operate in the context of a user. The following graphic illustrates the session consistency with musical notes. The "West US 2 writer" and the "West US 2 reader" are using the same session (Session A) so they both read the same data at the same time. Whereas the "Australia East" region is using "Session B" so, it receives data later but in the same order as the writes.
96
98
@@ -104,10 +106,10 @@ If writes were performed in the order `A, B, C`, then a client sees either `A`,
104
106
105
107
Below are the consistency guarantees for Consistent Prefix:
106
108
107
-
- Consistency for clients in same region for an account with single write region = Consistent Prefix
108
-
- Consistency for clients in different regions for an account with single write region = Consistent Prefix
109
-
- Consistency for clients writing to a single region for an account with multiple write region = Consistent Prefix
110
-
- Consistency for clients writing to multiple regions for an account with multiple write region = Eventual
109
+
- Consistency for clients in same region for an account with single write region = [Consistent Prefix](#consistent-prefix-consistency)
110
+
- Consistency for clients in different regions for an account with single write region = [Consistent Prefix](#consistent-prefix-consistency)
111
+
- Consistency for clients writing to a single region for an account with multiple write region = [Consistent Prefix](#consistent-prefix-consistency)
112
+
- Consistency for clients writing to multiple regions for an account with multiple write region = [Eventual](#eventual-consistency)
111
113
112
114
The following graphic illustrates the consistency prefix consistency with musical notes. In all the regions, the reads never see out of order writes:
0 commit comments