Skip to content

Commit e08ca36

Browse files
committed
Refine consistency models section in global distribution article for clarity and detail
1 parent 0393254 commit e08ca36

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

articles/cosmos-db/global-distribution.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,17 @@ For the Azure Cosmos DB databases configured with multiple write regions, the sy
8282
- **Last-Write-Wins (LWW)**, which, by default, uses a system-defined timestamp property (which is based on the time-synchronization clock protocol). Azure Cosmos DB also allows you to specify any other custom numerical property to be used for conflict resolution.
8383
- **Application-defined (Custom) conflict resolution policy** (expressed via merge procedures), which is designed for application-defined semantics reconciliation of conflicts. These procedures get invoked upon detection of the write-write conflicts under the auspices of a database transaction on the server side. The system provides exactly once guarantee for the execution of a merge procedure as a part of the commitment protocol. There are [several conflict resolution samples](how-to-manage-conflicts.md) available for you to play with.
8484

85-
## Consistency Models
85+
## Consistency models
8686

87-
Whether you configure your Azure Cosmos DB database with a single or multiple write regions, you can choose from the five well-defined consistency models. With multiple write regions, the following are a few notable aspects of the consistency levels:
87+
Whether you configure your Azure Cosmos DB database with a single or multiple write regions, you can choose from [five well-defined consistency models](consistency-levels.md). These models range from strong to eventual consistency and affect how replicas within partition-sets synchronize data.
8888

89-
The bounded staleness consistency guarantees that all reads will be within *K* prefixes or *T* seconds from the latest write in any of the regions. Furthermore, reads with bounded staleness consistency are guaranteed to be monotonic and with consistent prefix guarantees. The anti-entropy protocol operates in a rate-limited manner and ensures that the prefixes do not accumulate and the backpressure on the writes does not have to be applied. Session consistency guarantees monotonic read, monotonic write, read your own writes, write follows read, and consistent prefix guarantees, worldwide. For the databases configured with strong consistency, the benefits (low write latency, high write availability) of multiple write regions does not apply, because of synchronous replication across regions.
89+
In the context of global distribution:
9090

91-
The semantics of the five consistency models in Azure Cosmos DB are described [here](consistency-levels.md), and mathematically described using a high-level TLA+ specifications [here](https://github.com/Azure/azure-cosmos-tla).
91+
- **Bounded staleness** uses the anti-entropy protocol in a rate-limited manner, ensuring prefixes don't accumulate and writes aren't throttled unnecessarily.
92+
- **Session consistency** guarantees monotonic read, monotonic write, read your own writes, write follows read, and consistent prefix—worldwide.
93+
- **Strong consistency** requires synchronous replication across regions, which means multi-region write accounts don't benefit from low write latency or high write availability when using this level.
94+
95+
For complete details on consistency level semantics and guarantees, see [Consistency levels in Azure Cosmos DB](consistency-levels.md). The consistency models are also mathematically described using [TLA+ specifications](https://github.com/Azure/azure-cosmos-tla).
9296

9397
## Next steps
9498

0 commit comments

Comments
 (0)