---
source: https://iinventedlight.com/library/notes/azure-cosmos-db-consistency.md
title: "Consistency levels in Azure Cosmos DB"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC BY 4.0 (MicrosoftDocs/azure-docs); prose restates or closely paraphrases cited source lines"
license_family: azure-docs-ccby
rule_check: "needs rule check (family not in auto-publish rule; check.mjs auto-approves only usgov and arxiv-ccby)"
attribution: "Summary by iinventedlight (AI-assisted). Sources: Microsoft Learn (Azure docs), Consistency level choices - Azure Cosmos DB, CC BY 4.0 (MicrosoftDocs/azure-docs); Microsoft Learn (Azure docs), Unified AI Database - Azure Cosmos DB, CC BY 4.0 (MicrosoftDocs/azure-docs)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-04
status: published
checked_on: 2026-11-04
as_of: 2026-11-04
confidence: medium
untested: "No code was run for this note; only the fetched documentation pages were read."
category: coding-references
topic_area: "cloud: Azure"
tags: ['azure', 'cosmos-db', 'consistency']
sources:
  - id: S1
    title: "Consistency level choices - Azure Cosmos DB"
    publisher: Microsoft Learn (Azure docs)
    url: https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels
    accessed: 2026-11-04
    license: "CC BY 4.0 (MicrosoftDocs/azure-docs)"
  - id: S2
    title: "Unified AI Database - Azure Cosmos DB"
    publisher: Microsoft Learn (Azure docs)
    url: https://learn.microsoft.com/en-us/azure/cosmos-db/introduction
    accessed: 2026-11-04
    license: "CC BY 4.0 (MicrosoftDocs/azure-docs)"
---
# Consistency levels in Azure Cosmos DB

**Answer:** Distributed databases that rely on replication for high availability, low latency, or both must balance read consistency, availability, latency, and throughput as defined by the PACELC theorem. (S1)

## The two extremes

- The linearizability of the strong consistency model is the standard for data programmability. (S1)
- However, it increases write latencies because data must replicate and commit across large distances. (S1)
- Strong consistency also reduces availability during failures because data can't replicate and commit in every region. (S1)
- Eventual consistency offers higher availability and better performance, but it's more difficult to program applications because data might not be consistent across all regions. (S1)
- Most distributed NoSQL databases on the market today provide only strong and eventual consistency. (S1)

## Why it matters

- To achieve low latency and high availability, instances of these applications need to be deployed in datacenters that are close to their users. (S2)

## Claims
- id: C1
  claim: PACELC frames the trade-offs.
  source: S1
  evidence: "and throughput as defined by the PACELC theorem."
- id: C2
  claim: Strong consistency raises write latency.
  source: S1
  evidence: "It provides write latencies"
- id: C3
  claim: Eventual consistency is harder to program.
  source: S1
  evidence: "To learn more about consistency concepts"
- id: C4
  claim: Deploy close to users for low latency.
  source: S2
  evidence: "and make this data available to users in milliseconds."

## Sources
- [S1] Consistency level choices - Azure Cosmos DB. Microsoft Learn (Azure docs). https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels . License: CC BY 4.0 (MicrosoftDocs/azure-docs). Accessed 2026-11-04.
- [S2] Unified AI Database - Azure Cosmos DB. Microsoft Learn (Azure docs). https://learn.microsoft.com/en-us/azure/cosmos-db/introduction . License: CC BY 4.0 (MicrosoftDocs/azure-docs). Accessed 2026-11-04.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
