Azure Cosmos DB is a globally distributed, multi-model database service that enables you to create highly responsive and always-on applications. It supports multiple data models, including document, key-value, graph, and column-family, and is designed for mission-critical applications requiring high availability and low latency.
Understanding the core concepts of Azure Cosmos DB is crucial for effectively using the service:
An Azure Cosmos DB account is the top-level resource. It contains databases, and you can create multiple databases within a single account.
A database is a container for collections and users. It's a logical namespace for your data.
Collections (referred to as Containers in the SQL API context) are the fundamental unit of data storage and throughput. They are schema-agnostic and can store documents, key-value pairs, graphs, or rows.
Each collection is provisioned with a specific amount of Request Units (RUs) per second, which represents the throughput allocated to the collection.
Documents are the items stored within a collection. They are typically JSON documents but can be any format supported by the chosen API.
Request Units are a normalized measure of throughput provided by Azure Cosmos DB. They abstract the underlying resource consumption (CPU, memory, IOPS, etc.) for operations. A RU represents the cost of a specific operation, such as reading a 1KB document.
Partition keys are used to distribute data across multiple partitions. Choosing an effective partition key is essential for achieving high performance and scalability. Data is partitioned based on the value of the partition key for each item.
Azure Cosmos DB is a multi-model database that supports multiple APIs, allowing you to use the API that best suits your application's needs:
Azure Cosmos DB's unique capability is its turnkey global distribution. You can easily replicate your data across any number of Azure regions, providing low-latency access for users worldwide and high availability through automatic failover.
Explore the following resources for deeper insights: