Cosmos DB
Definition
Azure globally distributed NoSQL database service. Like having identical copies of your database instantly available worldwide.
Use Cases
- Microsoft: Low-latency, globally distributed data for large-scale consumer applications — Microsoft has publicly described using Azure Cosmos DB in Azure architecture guidance and reference implementations to support globally distributed apps by placing data close to users, using multi-region replication and configurable consistency levels. (Improved global responsiveness by serving reads/writes from regions closer to users and simplified operations by using a fully managed database with built-in replication and SLAs.)
- Azure Architecture Center (reference implementations): Global web and mobile applications needing fast reads worldwide and resilient multi-region failover — Microsoft’s Azure reference architectures commonly pair Cosmos DB with multi-region deployments, partition keys for horizontal scale, and autoscale throughput to handle variable traffic patterns. (Demonstrates patterns that reduce latency for global users and increase availability through multi-region redundancy and automated failover options.)
Provider Equivalents
- AWS: Amazon DynamoDB
- Azure: Azure Cosmos DB
- GCP: Cloud Spanner
- OCI: Oracle NoSQL Database Cloud Service
Frequently Asked Questions
- What's the difference between Azure Cosmos DB and Azure SQL Database?
- Azure SQL Database is a relational database (tables, joins, SQL) best for structured data and complex queries with strong relational constraints. Cosmos DB is a NoSQL database designed for massive scale and global distribution, using partitioning and flexible schemas (commonly JSON documents). Cosmos DB also offers multiple consistency levels and built-in multi-region replication, which is a common reason teams choose it for worldwide apps.
- When should I use Azure Cosmos DB?
- Use Cosmos DB when you need one or more of these: (1) very low latency for users around the world, (2) automatic multi-region replication and high availability, (3) elastic scaling for high request rates, (4) flexible schema for JSON/document data, or (5) predictable performance using provisioned or autoscaled throughput. It’s a strong fit for gaming, IoT telemetry, retail catalogs, user profiles, and event-driven apps that need fast reads/writes at scale.
- How much does Azure Cosmos DB cost?
- Cosmos DB pricing is mainly driven by: (1) throughput (RU/s) you provision or autoscale, (2) storage consumed, (3) number of regions (replicating to more regions increases cost), and (4) networking/backup features depending on configuration. Workloads with many reads/writes or inefficient queries can consume more RU/s, increasing cost. A common cost-control approach is choosing a good partition key, using autoscale for spiky traffic, and optimizing queries and indexing to reduce RU consumption.
Category: data
Difficulty: advanced
Related Terms
See Also