Graph
Azure Cosmos DB

šŸŒAzure Cosmos DB

NEW

Also known as: Cosmos DB

A globally distributed, multi-model Azure database with low latency, elastic throughput, and tunable consistency across regions.

DESCRIPTION

Azure Cosmos DB is a fully managed, globally distributed database for building highly responsive applications. It supports multiple APIs and data models, including key-value, document, graph, and column-family. Cosmos offers single-digit millisecond latency, automatic partitioning, and throughput measured in request units (RUs). Developers choose consistency levels from strong to eventual to balance performance and correctness. Features include global distribution, multi-homing, automatic failover, and SLA-backed availability. Common use cases span IoT telemetry, personalization, real-time catalogs, and event-driven microservices.

ALTERNATIVE DEFINITIONS

Microsoft Learn

Azure Cosmos DB is a fully managed NoSQL and relational database for modern app development.

Highlights fully managed nature and support for both NoSQL and relational APIs.

Source

Microsoft Azure

Build or modernize scalable, high-performance apps with fully managed, open-source–compatible Azure Cosmos DB for NoSQL, PostgreSQL, and MongoDB.

Emphasizes open-source compatibility and multi-API capabilities.

Source

NoSQL Global Replication Consistency Levels Shard Key Throughput RUs MongoDB API Cassandra API Gremlin API Azure Functions Azure CLI

COMPETING TERMS

Amazon DynamoDB MongoDB Atlas

RELATIONS

KNOWLEDGE AREAS

Cloud Data Services Data Storage & Operations Data Engineering

TARGET AUDIENCE

Software Developer Data Engineer Cloud Architect Solution Architect Data Architect

EXTERNAL SOURCES

TOP QUESTIONS

Why choose Azure Cosmos DB for global applications?

It offers turnkey multi-region replication, low-latency reads/writes, and SLA-backed availability. Tunable consistency lets you balance correctness and performance across geographies.

Category: Relevancy

How do request units (RUs) affect Cosmos DB costs?

RUs represent throughput capacity; higher RUs increase performance and cost. Optimize queries and partitioning to reduce RU consumption and bill.

Category: Requirements

What is the role of partition keys in Cosmos DB?

Partition keys determine data distribution and scalability. A well-chosen key avoids hot partitions and enables elastic horizontal scaling.

Category: Management

What are common mistakes with Cosmos DB consistency settings?

Using strong consistency globally often hurts latency and availability. Choosing eventual without understanding consequences can yield stale reads.

Category: Mistakes

How does Cosmos DB compare to Amazon DynamoDB?

Both are managed NoSQL with global distribution; Cosmos offers multiple data models and tunable consistency options, while DynamoDB emphasizes partition-key design and eventual consistency by default.

Category: Alternatives

When should you use the MongoDB API in Cosmos DB?

When you need MongoDB semantics with Azure-managed operations, global distribution, and SLAs, while leveraging familiar drivers and query language.

Category: Example

How is multi-region failover handled in Cosmos DB?

Cosmos provides automatic or manual failover across regions, maintaining availability SLAs. Multi-homing ensures continued access during regional outages.

Category: Management

What is the biggest misunderstanding about RUs in Cosmos DB?

Many equate RUs directly with throughput; RUs also reflect query complexity, item size, and indexing. Profiling and query tuning are essential.

Category: Misunderstanding

What risks accompany poor partition key selection in Cosmos DB?

Hot partitions cause throttling and high latency. Repartitioning later is complex and disruptive without planned migration strategies.

Category: Risks