Cosmos Database (DB) is a globally distributed, low latency, multi-model database for managing data at a large scale. It is a cloud-based NoSQL database offered as a Platform as a Service (PaaS) from Microsoft Azure. It is a highly available, high throughput, reliable database and is often called a serverless database.
Features of Cosmos DB
Globally Distributed: With Azure regions spread out globally, the data can be replicated globally.
Scalability: Cosmos DB is horizontally scalable to support millions of reads and writes per second.
Schematic-Agnostic Indexing: This enables the automatic indexing of data without schema and index management.
Multi-model: It can store data in Key-value pairs, Document-based, Graph-based, and column Family-based databases.
High Availability: It has 99.99% availability for reads and writes for both multi-region and single region Azure Cosmos DB accounts.
Low Latency: The global availability of Azure regions allows for the global distribution of data, which further makes it available nearest to the customers.
This indicates whether the data are in sync and are at the same state at any given point in time. Cosmos DB offers multiple levels of consistency with varying performance and availability.
There are a few levels:
Eventual: The data is written on the primary node and is propagated to read-only secondary nodes. It might take some time for the users to get updated data.
Strong: This offers the latest copy of data for all the users but gives a relatively low performance.
Common Use Cases
- Retail and Marketing
- Gaming: Game stats, scoreboards, social media integration
- Web and mobile applications