Conceptly
← All Concepts
🌍

Azure Cosmos DB

DatabaseA globally distributed NoSQL database with flexible data models

Azure Cosmos DB is a managed NoSQL database designed for global distribution, horizontal scale, and multiple API styles. It partitions data automatically, replicates it across regions, and lets teams choose consistency levels based on latency and correctness needs.

Architecture Diagram

🔍 Structure

Dashed line animations indicate the flow direction of data or requests

Why do you need it?

As applications spread globally, the physical location of the database starts shaping user experience directly. Teams then face a difficult combination of scale, flexible schemas, replication, and consistency. Building those concerns manually quickly turns into a distributed systems project of its own.

Why did this approach emerge?

Traditional relational databases were not designed for the combination of massive horizontal scale and global low-latency access that modern internet products demanded. Distributed NoSQL systems emerged to absorb that pressure, and Cosmos DB extends that pattern by pushing much of the replication and scaling machinery into the platform itself.

How does it work inside?

Cosmos DB distributes data through partition keys. Logical partitions are mapped onto physical partitions, and the service expands those partitions as data or traffic grows. Throughput is modeled through request units (a normalized measure of CPU, memory, and IO cost per operation), and consistency can be chosen along a spectrum so teams can balance latency against freshness requirements.

What is it often confused with?

Cosmos DB and Azure SQL Database are both Azure databases, but they are built around different trade-offs. Cosmos DB favors globally distributed, independently addressable records and schema flexibility. SQL Database favors relational structure, richer joins, and broader transactional semantics.

When should you use it?

Cosmos DB is a strong fit for globally accessed catalogs, user settings, feeds, session-like records, and high-volume event ingestion where independent items scale better than tightly joined relational rows. It is less natural when broad multi-entity transactions or strongly relational access patterns are central to the workload.

Serve globally distributed user-facing applicationsIngest large volumes of IoT or event dataSupport recommendation, profile, or catalog workloadsStore high-scale document or key-value style records