Azure Cosmos DB Tutorials

Hands‑on guides to help you design, build, and optimize applications using Azure Cosmos DB.

Getting Started

Learn how to create a Cosmos DB account, choose an API, and insert your first document.

var client = new CosmosClient("endpoint", "key");
var database = await client.CreateDatabaseIfNotExistsAsync("SampleDB");
var container = await database.Database.CreateContainerIfNotExistsAsync("Items", "/partitionKey");
Read full tutorial

Data Modeling

Design optimal data models for scalability and performance in a multi‑model environment.

Explore data modeling

Partitioning Strategies

Understand how to choose partition keys and manage throughput across partitions.

Learn about partitioning

Indexing & Queries

Customize indexing policies and write efficient SQL, MongoDB, or Gremlin queries.

Dive into indexing

Performance Tuning

Monitor RU consumption, use change feed, and apply best practices for low latency.

Optimize performance

Security & Access Control

Secure your data with RBAC, Azure AD integration, and network isolation.

Secure your Cosmos DB

Migration Guides

Move from on‑premise NoSQL solutions or other cloud services to Cosmos DB.

Start migration