CosmosDB is a globally distributed, consistent, schema-less, multi-model document database that provides high-throughput and availability across various geographical regions. It started as an internal project called "Florence" at Microsoft and then later expanded to Document DB and then finally to Cosmos DB. It is used to solve data storage problems of large-scale distributed Internet-scale applications. Most of the Microsoft internal services such as Bing, Office 365, Ads, etc. and many other external services use Cosmos DB for their storage needs. It provides 99.99% availability regardless of a number of regions associated with data.
- Developer
- Country of Origin
- US
- Start Year
- 2015
- Former Name
- DocumentDB
- Project Type
- Commercial
- Written in
- C++
- Supported Languages
- C#, Go, Java, JavaScript, Python
- Operating System
- Windows
- License
- Proprietary
CosmosDB is a globally distributed, consistent, schema-less, multi-model document database that provides high-throughput and availability across various geographical regions. It started as an internal project called "Florence" at Microsoft and then later expanded to Document DB and then finally to Cosmos DB. It is used to solve data storage problems of large-scale distributed Internet-scale applications. Most of the Microsoft internal services such as Bing, Office 365, Ads, etc. and many other external services use Cosmos DB for their storage needs. It provides 99.99% availability regardless of a number of regions associated with data.
History
CosmosDB started as a successor to DocumentDB in 2006
Concurrency Control
Cosmos DB is a service that runs on a massive scale distributed system on a large cluster of servers over multiple distributed geographic regions. To make sure that meta-data is consistent across the regions, Cosmos DB uses a Paxos like protocol.
Data Model
Cosmos DB provides a multi-model database with horizontal partitioning.
Indexes
Cosmos DB uses Bw-Tree indexes to index a complete schema-less (NoSQL) document. To support fast random writes on SSDs and Disks, Cosmos DB uses Log-Structured merge trees.
System Architecture[03]
Cosmos DB service is deployed on several replicated shared-nothing nodes across geographical regions for high-availability, low-latency, and high throughput. Some or all of these distributed nodes form a replica set for serving requests on a data shard. Among the nodes, one of them is elected as a master to perform total-ordered writes on the data shard. Writes are done on the write-quorum (W), a subset of the replica nodes, to ensure that the data is durable. Reads are performed on read-quorum (R), a subset of replica nodes, to get the desired consistency levels (Strong, Bounded-staleness, Session, Consistent Prefix, Eventual) as configured by users.
Citations
3 sources- Azure Cosmos DB | Microsoft Azure microsoft.com
- Azure Cosmos DB documentation - Azure Cosmos DB | Microsoft Learn microsoft.com
- Consistency level choices - Azure Cosmos DB | Microsoft Learn microsoft.com