+1 vote
in Azure by
What are various consistency models available in Cosmos DB?

1 Answer

0 votes
by

Consistency models or consistency levels provide developers with a way to choose between better performance and high availability.

The consistency models available in Cosmos DB are: 

  1. Strong: It fetches the most recent version of the data every time a read operation occurs. The cost of reading operation is higher compared to other consistency models in this model.
  2. Bounded Staleness: It allows setting a time lag between the write and the read operation. It is suitable for scenarios with equal priority for availability and consistency.
  3. Session: It is the default and most popular consistency level in Cosmos DB based on regions. A user will see the latest data after accessing the same region where the write was performed. Among all consistency levels, it offers the lowest latency reads and writes.
  4. Consistent Prefix: It guarantees that users do not see out-of-order writes, but there is no time-bound data replication across regions.
  5. Eventual: It does not guarantee any time-bound or version bound replication. It has the lowest read latency and level of consistency.
...