XenonStack

Enterprise Data Management

XenonStack Insights Azure Cosmos DB: Features, Limits and Use Cases

and | Published | Updated

Azure Cosmos DB: Features, Limits and Use Cases
25:29
Featured image titled Azure Cosmos DB: features and limits, with a stack from multi-region replication through partitions and request units to APIs and governed agent decisions

Key takeaway

  • Azure Cosmos DB for enterprise leaders: APIs, five consistency levels, partitioning, RU limits, availability, cost controls and where AI agents fit.

Azure Cosmos DB is Microsoft's fully managed NoSQL and vector database for operational workloads that need low latency, elastic scale and multi-region availability. For enterprise teams the useful question is not what it can do, but which workloads justify it, and how consistency, partitioning and throughput choices shape cost and risk.

This guide covers the resource model, the five consistency levels, partitioning, the documented limits, the available APIs, availability and cost controls. It sits alongside our guides to NoSQL databases, SQL vs NoSQL vs NewSQL and Azure serverless computing. Figures come from Microsoft Learn, read on 13 November 2026; confirm limits and pricing on the linked pages before you design.

What is Azure Cosmos DB?

According to Microsoft Learn, Azure Cosmos DB is a fully managed NoSQL and vector database that handles patching, updates and capacity management, with serverless and autoscale options. It supports document, vector, key-value, graph and table data models, deploys across Azure regions, and automatically indexes data without manual index maintenance for most workloads.

Three features matter most to architects. Multi-region writes and automatic failover carry a 99.999% availability SLA for multi-region accounts. Change feed supports event-driven designs. Integrated vector and hybrid search (DiskANN) lets embeddings sit beside operational data for retrieval and agent workloads.

When does Azure Cosmos DB fit, and when does it not?

WorkloadFitWhy, according to Microsoft Learn
Latency-sensitive personalisationGoodDesigned for single-digit millisecond responses at any scale
Highly elastic traffic such as ticketing or bookingGoodAutoscale and serverless match capacity to demand
High-throughput device state and logsGoodHorizontal scale-out with change feed for downstream processing
Customer-facing, mission-critical appsGoodMulti-region writes, automatic failover, SLA-backed availability
Analytical (OLAP) workloadsPoorMicrosoft suggests Microsoft Fabric instead
Highly relational applicationsPoorMicrosoft suggests Azure SQL or Azure Database for MySQL instead

If you need MongoDB aggregation depth or portability across clouds, Microsoft positions Azure DocumentDB (vCore) as the alternative. Its own comparison lists a 99.995% availability SLA for DocumentDB against 99.999% for multi-region Azure Cosmos DB, and a scale-up rather than scale-out model. For a broader view of how document stores differ from other engines, see our FoundationDB architecture guide.

How do the five consistency levels trade off?

Microsoft Learn describes five levels, from strongest to weakest. Read and write latency is guaranteed under 10 ms at the 99th percentile for all levels, with multi-region strong consistency as the exception, where write latency depends on round-trip time between regions.

Two-column diagram mapping Azure Cosmos DB consistency levels strong, bounded staleness, session and consistent prefix or eventual to their recovery point objective and practical meaning, ending with the rule to pick the weakest level the process can tolerate
LevelWhat you getTrade-off
StrongLinearizable reads of the latest committed writeHigher write latency across regions; reads cost about twice the RUs of weaker levels; not available with multiple write regions
Bounded stalenessReads lag writes by at most K versions or T timeBest with single-write-region accounts of two or more regions; writes throttle if lag exceeds the bound
SessionRead-your-writes within a client sessionDescribed as the most widely used level; client must keep its session token
Consistent prefixReads never see out-of-order writesSingle-document writes behave as eventual
EventualLowest cost and latency, no ordering guaranteeReads can be stale

The level also sets data durability in a regional outage. For accounts with more than one region and a single write region, strong consistency gives an RPO of 0, while session, consistent prefix and eventual give an RPO under 15 minutes. Decide the level per business process, not per platform.

How do partitioning and request units work?

Items are grouped into logical partitions by partition key and spread across physical partitions by hashing, as Microsoft Learn explains. You cannot change a partition key in place; you move data to a new container. Choose a key with high cardinality, an unchanging value and an even spread of requests. Low-cardinality keys such as status or country risk hot partitions, and a random GUID that queries never filter on turns most reads into cross-partition queries. Hierarchical partition keys allow up to three levels and avoid the 20 GB logical partition ceiling.

Documented defaults from the service quotas page, which you should confirm before sizing:

LimitDocumented value
Storage per logical partition20 GB
Throughput per partition (logical and physical)10,000 RU/s
Maximum RU/s per container or database1,000,000 (raise by support ticket)
Minimum throughput, manual, per container400 RU/s
Minimum autoscale max RU/s per container1,000 RU/s
Maximum item size2 MB (16 MB for the MongoDB API with enablement)
Operations in a transactional batch100, within one partition key
Databases and containers per account500 combined
Serverless regions per account1

Which APIs are available, and which should a new project use?

Azure Cosmos DB offers the native API for NoSQL plus wire-compatible APIs for MongoDB, Apache Cassandra, Apache Gremlin and Table. Each API needs its own account, and Microsoft advises preferring the native API for NoSQL for most new applications that can choose their drivers, because it has the fastest feature delivery and turnkey global distribution. The Cassandra overview page itself points high-scale users to the API for NoSQL and lift-and-shift Cassandra migrations to Azure Managed Instance for Apache Cassandra. Confirm current feature support for the Gremlin, Table and MongoDB APIs on Microsoft Learn before committing.

How is availability and cost controlled?

Microsoft describes three capacity choices. Provisioned throughput can be manual or autoscale; autoscale scales between 10% and 100% of the maximum RU/s you set and bills hourly on the highest level reached. Serverless bills by consumption and suits spiky or sporadic traffic, though it is limited to one region. Reserved capacity is documented at up to 63% off, and a lifetime free tier gives 1,000 RU/s and 25 GB. Check current prices on the Azure pricing page, and see our guide to FinOps for Azure for allocation and review practice. Continuous backup with point-in-time restore protects against accidental deletes.

Where do AI agents fit?

Agents need fast operational state, retrieval over embeddings and a record of what they did. Azure Cosmos DB can hold state and vectors together, but the database does not decide what an agent may do. ElixirClaw is an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control, and ElixirData keeps governed context, versioned policy and decision traces in one decision layer above AI agents. For the audit trail risk teams need, AgentGRC keeps autonomous agent actions inside policy.

What is a sensible adoption sequence?

  1. Pick one workload from the fit table and write down its access patterns before choosing a partition key.
  2. Choose the consistency level per process and record the RPO it implies.
  3. Load test with realistic RU consumption, then choose autoscale, manual or serverless.
  4. Set alerts on logical partition size and throttling, and plan multi-region only where the SLA need justifies the cost.
  5. Review cost and partition health each quarter.

To map one decision your agents should make against this data layer, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

Frequently asked questions

Is Azure Cosmos DB SQL or NoSQL?

It is a NoSQL database. Its native API for NoSQL stores JSON documents and is queried with a SQL-like language, and Microsoft also offers wire-compatible APIs for MongoDB, Apache Cassandra, Apache Gremlin and Table.

What is a partition key in Azure Cosmos DB?

It is the item property that decides which logical partition an item belongs to. According to Microsoft Learn it cannot be changed in place, each logical partition holds up to 20 GB, and a good key has high cardinality and spreads requests evenly.

What are request units (RU/s)?

Request units are the currency for throughput. Each operation consumes RUs, and you provision capacity, or let autoscale or serverless handle it, in RU/s. Microsoft Learn sets the manual minimum at 400 RU/s per container.

Which consistency levels does Azure Cosmos DB offer?

Five, from strongest to weakest: strong, bounded staleness, session, consistent prefix and eventual. Session is described by Microsoft as the most widely used level.

When is Azure Cosmos DB a poor fit?

Microsoft Learn lists analytical (OLAP) workloads and highly relational applications as poor fits, and points to Microsoft Fabric and Azure SQL or Azure Database for MySQL respectively.

Next Steps for Implementing Azure Cosmos DB

Talk to our experts about implementing Azure Cosmos DB, how industries and different departments use globally distributed databases and multi-model APIs to enhance scalability and performance. Utilize Azure Cosmos DB to automate and optimize data management, improving efficiency and responsiveness.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in Solving your Challenges with XenonStack Team
Get Started

Get Started with your requirements and primary focus, that will help us to make your solution

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Proceed Next