Azure Cosmos DB is Microsoft's globally distributed, multi-model database service. It is designed to offer robust support for mission-critical applications by providing comprehensive service level agreements (SLAs) for throughput, latency, availability, and consistency. Cosmos DB is the first and only globally distributed database service that natively supports.
Key Features and Benefits
Globally Distributed
Distribute your data across any number of Azure regions, with transparent application failover and multi-region writes for low latency access anywhere.
Multi-Model
Support for various data models and APIs including Document (SQL), Key-Value, Graph, and Column-Family, allowing you to choose the best fit for your application.
Guaranteed Throughput and Latency
Elastic scaling of throughput and storage, with guaranteed low latency and high availability, backed by industry-leading SLAs.
Turnkey Global Distribution
Easily replicate your data to any Azure region with a single API call, enabling you to deploy applications closer to your users worldwide.
High Availability
99.999% availability for multi-region configurations and 99.99% for single-region configurations, ensuring your applications are always accessible.
Multiple Consistency Models
Choose from five well-defined consistency levels, offering a trade-off between availability and performance tailored to your application's needs.
Core Concepts
Understanding these core concepts is crucial for effective use of Azure Cosmos DB:
- Accounts: A Cosmos DB account is the top-level resource. It contains databases.
- Databases: A database is a logical namespace that contains your data and is used to organize and manage containers.
- Containers: A container is a collection of items. You can think of it as a schema-less JSON document collection, a key-value store, a graph, or a column-family table.
- Items: An item is the base-level construct within a container. In a document database, an item is represented as a JSON document.
- Partition Keys: Used to efficiently distribute data across logical partitions. Choosing an effective partition key is critical for performance and scalability.
- Request Units (RUs): A normalized measure of the resources (CPU, memory, IOPS, etc.) needed to perform database operations.
Supported APIs
Cosmos DB offers a range of APIs to meet diverse developer needs:
- Core (SQL) API: For document data, with a rich query language.
- MongoDB API: For applications built on MongoDB.
- Cassandra API: For applications built on Apache Cassandra.
- Gremlin API: For graph data and traversals.
- Table API: For applications built on Azure Table Storage.
Use Cases
Azure Cosmos DB is an excellent choice for a variety of modern application scenarios, including:
- IoT data streaming and processing
- Web and mobile applications
- Gaming leaderboards and real-time user profiles
- Microservices and serverless architectures
- Applications requiring global distribution and low latency
Ready to get started? Explore the Quick Start guide or learn more about performance tips.