Azure Cosmos DB Patterns
Azure Cosmos DB patterns covering data modeling, partition key design, denormalization, TypeScript SDK v4, Python async SDK, change feed, and performance optimization.
- Difficulty
- intermediate
- Read time
- 1 min read
- Version
- v1.0.0
- Confidence
- established
- Last updated
Quick Reference
Azure Cosmos DB: Choose partition key with high cardinality (often /id for small containers). Denormalize and embed related data. Use entity type field when mixing item types. Single client instance per app lifetime. Async SDK with DefaultAzureCredential. Exclude unused paths from indexing. Use change feed for event-driven patterns.
Use When
- Azure NoSQL database
- Globally distributed data
- Multi-model database
- Event-driven with change feed
Skip When
- AWS DynamoDB
- MongoDB
- Relational databases
Azure Cosmos DB Patterns
Azure Cosmos DB patterns covering data modeling, partition key design, denormalization, TypeScript SDK v4, Python async SDK, change feed, and performance optimization.