Skip to content

Commit bcf6ae1

Browse files
20220217 Improve clickthrurate for KPI
1 parent da6e858 commit bcf6ae1

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

articles/cosmos-db/consistency-levels.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: markjbrown
55
ms.author: mjbrown
66
ms.service: cosmos-db
77
ms.topic: conceptual
8-
ms.date: 09/20/2021
8+
ms.date: 02/17/2022
99
---
1010
# Consistency levels in Azure Cosmos DB
1111
[!INCLUDE[appliesto-all-apis](includes/appliesto-all-apis.md)]
@@ -14,11 +14,13 @@ Distributed databases that rely on replication for high availability, low latenc
1414

1515
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:
1616

17-
- *Strong*
18-
- *Bounded staleness*
19-
- *Session*
20-
- *Consistent prefix*
21-
- *Eventual*
17+
- [*Strong*](#strong-consistency)
18+
- [*Bounded staleness*](#bounded-staleness-consistency)
19+
- [*Session*](#session-consistency)
20+
- [*Consistent prefix*](#consistent-prefix-consistency)
21+
- [*Eventual*](#eventual-consistency)
22+
23+
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).
2224

2325
Each level provides availability and performance tradeoffs. The following image shows the different consistency levels as a spectrum.
2426

@@ -71,10 +73,10 @@ Bounded staleness offers total global order outside of the "staleness window." W
7173

7274
Inside the staleness window, Bounded Staleness provides the following consistency guarantees:
7375

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)
7880

7981
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:
8082

@@ -86,11 +88,11 @@ In session consistency, within a single client session reads are guaranteed to h
8688

8789
Clients outside of the session performing writes will see the following guarantees:
8890

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)
9496

9597
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.
9698

@@ -104,10 +106,10 @@ If writes were performed in the order `A, B, C`, then a client sees either `A`,
104106

105107
Below are the consistency guarantees for Consistent Prefix:
106108

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)
111113

112114
The following graphic illustrates the consistency prefix consistency with musical notes. In all the regions, the reads never see out of order writes:
113115

0 commit comments

Comments
 (0)