Azure Cosmos DB Overview

Azure Cosmos DB is a globally distributed, multi-model database service that enables you to harness the benefits of geographic distribution, elastic scaling, and rich query capabilities for your mission-critical applications.

Introduction

Azure Cosmos DB is Microsoft's globally distributed, multi-model database service. It offers an enterprise-grade, fully managed NoSQL database that supports document, key-value, graph, and column-family data models, along with the Azure Cosmos DB for MongoDB API, Azure Cosmos DB for Cassandra API, Azure Cosmos DB for Gremlin API, and Azure Cosmos DB for Table API.

It is designed for modern applications requiring low latency, high availability, and elastic scalability. Cosmos DB provides a set of APIs to interact with data, allowing developers to choose the API that best suits their application's needs.

Key Features

Global Distribution

Distribute your data across any number of Azure regions worldwide. Read and write operations are routed to the nearest region for low latency access.

Elastic Scalability

Independently and elastically scale throughput and storage on demand. Scale up or down as your application's needs change, without downtime.

Guaranteed Low Latency

Achieve single-digit millisecond latency for both reads and writes at the 99th percentile, anywhere in the world.

Multiple APIs

Support for multiple data models and APIs: SQL (Core), MongoDB, Cassandra, Gremlin, and Table.

Tunable Consistency Models

Choose from five well-defined consistency levels (Strong, Bounded Staleness, Session, Consistent Prefix, Eventual) to balance consistency, availability, and performance.

High Availability

Automatic failover and data replication ensure high availability and disaster recovery capabilities.

Data Models

Azure Cosmos DB is a multi-model database, supporting various data models:

These models are accessible through various APIs, including the SQL (Core) API, which is the native API for Cosmos DB.

Performance and Scalability

Cosmos DB offers predictable performance with guaranteed throughput (Request Units per second - RU/s) and storage. You can scale these resources independently, allowing you to adapt to changing application demands without impacting performance.

Throughput can be provisioned:

Storage scales automatically as you add data to your containers.

Global Distribution

Azure Cosmos DB's core feature is its ability to distribute data globally. You can enable a database account for multi-master writes and have data replicated to any number of Azure regions. This ensures:

Consistency Models

Cosmos DB provides a comprehensive set of five distinct consistency levels, allowing you to strike the right balance between consistency, availability, and performance for your specific application needs:

Common Use Cases

Azure Cosmos DB is well-suited for a wide range of applications:

Getting Started

To start using Azure Cosmos DB:

  1. Create an Azure Cosmos DB Account: Through the Azure portal, CLI, or SDKs.
  2. Choose an API: Select the API that best fits your application (SQL, MongoDB, Cassandra, etc.).
  3. Create a Database and Container: Define your data structure.
  4. Ingest Data: Add your data to the container.
  5. Query Data: Use the chosen API's query language (e.g., SQL for the Core API) to retrieve and manipulate data.

Explore the official Azure Cosmos DB documentation for detailed guides, tutorials, and API references.